Блог пользователя Olaf

Автор Olaf, 10 лет назад, По-английски

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?

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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