ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1180. Stone Game

can anyone explain me the sample
Posted by Anupam Ghosh, Wipro Technologies 18 Oct 2012 21:25
Hi All,

1. 1st player Take 2 stones   left over is 8-2=6
2. 2nd player  takes 1 stone  left over  is 6-1=5
3. 1st player takes either 1 (left over is 4)0r 4 stones (left over is 1)
4. Finally 2nd player takes remiang stones.  Thus second player wins.

Did I understand the problem statements properly? According to the output given in sample 1st player has won but how? Please could you explain.

Regards
Anupam
Re: can anyone explain me the sample
Posted by Anupam Ghosh, Wipro Technologies 18 Oct 2012 21:53
Now I got it, in 3rd step player picks up 2 stones. Then it guarnatees win of 1st player.