-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA_Cards_for_Friends.cpp
More file actions
47 lines (45 loc) · 1.22 KB
/
A_Cards_for_Friends.cpp
File metadata and controls
47 lines (45 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
``````````````
``` হে বস ```
``` কি খবর ভালো তো ```
``` ? ```
``` ```
``` ```
````````````
*/
#include<bits/stdc++.h>
using namespace std;
int t, count;
#define ll long long
#define yes cout << "YES" << endl;
#define no cout << "NO" << endl;
#define cout(n) cout << n << endl;
#define TestCase cin >> t; while(t--)
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
TestCase{
int w, h, n;
int sum = 0;
cin >> w >> h >> n;
while((w % 2) != 0 and (h % 2 != 0)){
if(w % 2 == 0){
sum += ((w / 2) * h);
w = w - (w / 2);
}
if(h % 2 == 0){
sum += ((h / 2) * w);
h = h - (h / 2);
}
}
if((sum + 1) >= n){
yes;
}
if((sum + 1) < n){
no;
}
}
return 0;
}