CodeChef submission 152568 (C++ 4.0.0-8) plaintext list. Status: AC, problem RESN04, contest RESNKDWN. By resnk_double_s (resnk_double_s), 2009-12-20 16:46:57.
#include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<cassert> #include<ctime> #include<iostream> #include<string> #include<vector> #include<algorithm> #include<map> #include<set> #include<stack> #include<queue> #define PB push_back #define M 1000 #define N 1000 #define LL long long using namespace std; int main() { int tc,i,j,k; while(tc--) { int piles; int ans=0; for(i=1;i<=piles;++i) { ans+=j/i; } if(ans%2==1) else } return 0; }
Comments


Is this solution really
Is this solution really correct?
If there are two piles with 1 and 2 stones respectively, Alice can remove 1 stone from the second pile and win, but your program will produce an answer that Bob wins.
That is not a valid move
That is not a valid move according to the problem statement.