Olaf's blog

By Olaf, 10 years ago, In English

test 4 is :

5 6 abas dsfdf abacaba dartsidius kolobok

and the expected answer is Second, meaning that the first player cant win, but, the first player can pick 'k' as his first word, and the game goes as following:

second player : o first player : l second player : o first player : b second player : o first player : k

and the second player cannot move at this point, so the first player has a winning strategy.. so the expected answer should be First?

am i making a mistake? or is the test case wrong?

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

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

But there are k = 6 games. When the second player loses his first game, he begins the second game and there are still 5 of them left.

A winner is the person who wins the last game. If everyone's first move would be taking 'k', then First would win first game, Second — second, First — third, Second — fourth, First — fifth and Second — last (he's a winner). Of course, players may have another strategy, but this is an example :P