You are viewing a single comment's thread. Return to all comments →
I did pretty much that
cout<<(S+M-2)%N+1<<"\n";
But I didn't completely understand why it worked, your index explanation helped, thanks.
Seems like cookies are disabled on this browser, please enable them to open this website
Save the Prisoner!
You are viewing a single comment's thread. Return to all comments →
I did pretty much that
But I didn't completely understand why it worked, your index explanation helped, thanks.