Here it is: DYNAMO Solution - CodeChef January Long Challenge 2020 - YouTube
Commented code: CodeChef: Practical coding for everyone
Similar game theory problem:
discrete mathematics - Single Pile Nim proof by Induction - Mathematics Stack Exchange
Nim - Wikipedia
Comments, questions, requests, criticism, are all welcome!
1 Like
Hey william lie big fan here , i was looking for the solution for this Question can you tell me why my code gives partially correct –
and i tried just using endl (since it flushes out too) but it still gives partially correct
int t;cin>>t;
while(t--){ //cheffa gives ll n; cin>>n; ll maxi = power((ll)10,n); ll a; cin>>a; cout<<endl; //i give ll s = 2*maxi; s+=a; cout<<s<<flush<<endl; //cheffa gives ll b; cin>>b; cout<<endl; //i give ll c = maxi - b; cout<<c<<flush<<endl; //cheffa gives ll d; cin>>d; cout<<endl; //i give ll e = maxi - d; cout<<e<<flush<<endl; ll ans; cin>>ans; if(ans==-1) exit(0); }