Codeforces 1337B. Kana and Dragon Quest game Solution

Solution in C++:
  1. ///**********ALLAH IS ALMIGHTY************///
  2. ///AH Tonmoy
  3. ///Department of CSE,23rd batch
  4. ///Islamic University,Bangladesh
  5. #include<iostream>
  6. using namespace std;
  7. int main()
  8. {
  9. int t,m,n,a,v,c;
  10. cin>>t;
  11. while(t--)
  12. {
  13. cin>>a>>n>>m;
  14. while(n--)
  15. {
  16. c=a;
  17. v=a/2+10;
  18. a=min(v,c);
  19. }
  20. if(a-(m*10)<=0)
  21. cout<<"YES"<<endl;
  22. else
  23. cout<<"NO"<<endl;
  24. }
  25. }

No comments

Most View Post

Recent post

Codeforces Round 925 (Div. 3) 1931D. Divisible Pairs Solution

    Problem Link  :   https://codeforces.com/contest/1931/problem/D S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. ...

Powered by Blogger.