6 / 6
May 2011

My (seemingly correct) solution is getting WA for this problem, so I would like clarification on a few points:

The first move made by Nikifor is called Turn 1, and his opponents Turn 2 and so on, correct?

"If Nikifor wins then in the second line you must output the first turn which guarantees victory for him."

If Nikifor wins then on Turn 1 his victory is assured, thus it can be said that Turn 1 guarantees victory for him, no?
Otherwise it can not be said that Nikifor wins.

Perhaps what confuses me most is the example.
If Nikifor moves on odd turns, how can it be said that his victory is guaranteed on Turn 4?
Would it not be guaranteed on Turn 3?

Thanks, in advance.

  • created

    Apr '07
  • last reply

    May '11
  • 5

    replies

  • 799

    views

  • 4

    users

You got it wrong. It's not about turns. In the example 4 is first Nikifor "move" -- the number he wants to substract -- in this case 4.

You got it wrong. It's not about turns. In the example 4 is first Nikifor "move" -- the number he wants to substract -- in this case 4.

4 years later

can someone here please post more test cases for this problem.

Thanks,
Kusum

You would be more likely to get help if you posted in the Problemset Archive and posted your code.

Random guessing at what test cases might fail your code just frustrates you and us.