Advertisement
Ahmed_Negm

B

Apr 14th, 2024
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define ll long long
  5. #define nl "\n"
  6.  
  7. void files(){
  8.     ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
  9.     #ifndef ONLINE_JUDGE
  10.         freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  11.     #endif
  12. }
  13.  
  14.  
  15. void solve(){
  16.     ll n,m,k; cin>>n>>m>>k;
  17.     ll maxi = n*m-(n+m-1);
  18.  
  19.  
  20.     cout<<(k>maxi?"NO":"YES")<<nl;
  21.  
  22. }
  23.  
  24. int main(){
  25.     files();
  26.     int t = 1;
  27.     cin>>t;
  28.     while(t--) solve();
  29.  
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement