-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA-Cards For Friends
More file actions
53 lines (44 loc) · 1.49 KB
/
A-Cards For Friends
File metadata and controls
53 lines (44 loc) · 1.49 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
48
49
50
51
52
53
/////////////// PRANTA KUMER PANDIT ///////////////
// Test Case Based Template //
// //
// BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY (BUBT) //
// INTAKE 52 //
// DEPARTMENT OF CSE //
// //
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||//
// WELCOME TO ISHAN'S PARADISE //
// (-.-) Training to be a Secret Tool of Next ICPC (-.-) //
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define yes cout << "YES\n"
#define no cout << "NO\n"
#define all(x) (x).begin(), (x).end()
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) ((a) * (b)) / gcd(a,b)
#define optimize() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
void ishan() {
int w, h, n;
cin >> w >> h >> n;
int pieces = 1;
while (w % 2 == 0) {
pieces *= 2;
w /= 2;
}
while (h % 2 == 0) {
pieces *= 2;
h /= 2;
}
if (pieces >= n) yes;
else no;
}
int main() {
optimize();
int lol;
cin >> lol;
while (lol--) {
ishan();
}
return 0;
}
// THANK YOU //