-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdragonQuest.cpp
38 lines (36 loc) · 1.1 KB
/
dragonQuest.cpp
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
//http://codeforces.com/contest/1337/problem/B
#include<iostream>
#include<unordered_map>
using namespace std;
int main(){
int n,t,x,m;
cin>>t;
while(t--){
cin>>x>>n>>m;
if(x<20){
while(m--){
x = x-10;
//cout<<"hi";
}
}
else{
while(n--){
if(x<=0){
break;
}
else{
x = x/2 + 10;
}
}
while(m--){
x = x-10;
}
}
if(x<=0){
cout<<"YES"<<"\n";
}
else{
cout<<"NO"<<"\n";
}
}
}