vivek.'s blog

By vivek., history, 22 months ago, In English

Hello, In the Problem 1695B ( https://codeforces.com/contest/1695/problem/B ), when no. of piles is odd i.e. n is odd, the solution (tutorial) states the following statement: "If n is odd, Mike can remove all of the stones from the first pile. Then, on the n+1th turn (the first turn where the game can end), Joe will be forced to remove from the first pile, which is empty. So Mike can always win if n is odd."

But when observed for below example , n=5 entries=9 1 8 10 11 after first iteration the entries will be: 8 0 7 9 10 , and the turn will be of Mike at zero and thus Joe will win. This contradicts the tutorial solution.

If the tutorial solution is correct, please explain the logic for the same.

Thank you

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it