题解 CF1519B 【The Cake Is a Lie】
这题是个找规律的题。
规律就是,从
那么到达
代码:
#include<bits/stdc++.h>
using namespace std;
inline int read()
{
int s=0,w=1;
char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
return s*w;
}
inline void write(int x)
{
if(x<0) putchar('-'),x=-x;
if(x>9) write(x/10);
putchar(x%10+'0');
}
int T;
int main()
{
T=read();
while(T--)
{
int n=read(),m=read(),k=read();
if(n*m-1==k)
{
puts("Yes");
}
else
{
puts("No");
}
}
}