Skip to main content

Posts

Showing posts with the label codchef lon challenge

Chef Wars - Return of the Jedi Solution August long challenge 2020 Solution

Chef Wars - Return of the Jedi  Solution August long challenge 2020 Solution Tag-BruteForce  SOLUTION- #include <iostream> using namespace std; #define ll long long int int main() { ll t; cin>>t; while(t--)    {     ll h,p;cin>>h>>p;     while(p>0)     {     if(h<=0)     break;     h-=p;     p/=2;     }     if(h<=0)     cout<<"1\n";     else     cout<<"0\n";    } } i have created a very concise blog about DYNAMIC -Programming  if you want you can check out  Link You can follow for upcoming questions/Contest