I used 2 representation for writing same condition:
1)if(n%4==1)
cout<<“ALICE”<<“\n”;
else
cout<<“BOB”<<“\n”;
link:CodeChef: Practical coding for everyone
2)if((n>>1)&1)
cout<<“BOB”<<“\n”;
else
cout<<“ALICE”<<“\n”;
link:CodeChef: Practical coding for everyone
I don’t know why second one gives WA ?
Both are running fine on my system…
reply asap…