-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path693A.cpp
More file actions
50 lines (45 loc) · 824 Bytes
/
Copy path693A.cpp
File metadata and controls
50 lines (45 loc) · 824 Bytes
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
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
int w, h,n;
scanf("%d %d %d", &w, &h, &n);
int ans = 1;
int cnt = 0;
while (w%2==0)
{
if(ans==1){
ans++;
}
else
{
ans*= 2;
}
w/=2;
}
int cnt1 = 0;
while (h%2==0)
{
if(ans==1){
ans++;
}
else
{
ans*=2;
}
h/=2;
}
// printf("%d\n",ans);
if(ans >= n){
printf("YES\n");
}
else
{
printf("NO\n");
}
}
}