Skip to content

Commit 044b116

Browse files
committed
Added 1337B - Kana and Dragon Quest game.cpp
1 parent 3335bbe commit 044b116

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// ॐ नमः शिवाय
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
5+
// Code Written By: Vikash Patel
6+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
7+
8+
int main()
9+
{
10+
int t;
11+
cin>>t;
12+
while(t--)
13+
{
14+
int x,n,m;
15+
cin>>x>>n>>m;
16+
while(n-- && x>20)
17+
{
18+
x = x/2+10;
19+
}
20+
while(m-- && x>0)
21+
{
22+
x = x-10;
23+
}
24+
if(x>0)
25+
cout<<"NO"<<endl;
26+
else
27+
cout<<"YES"<<endl;
28+
}
29+
}

0 commit comments

Comments
 (0)