Emruz_Hossain's blog

By Emruz_Hossain, 10 years ago, In English

How in this Input the winner can be Second Player.

Test: #4

5 6

abas

dsfdf

abacaba

dartsidius

kolobok

If first player give moves on abas then he will loss. According to question he will give move first in the next game. If he give moves again abas and he will loss again. Same way he can do it for five times and in the 6th game if he give moves on dsfdf he will win. So according to question the Winner is first player.But the answer is second player. Why? please anybody explain what is my wrong. Thanks in advanced.

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

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

You are not correct with "first player give moves on abas" — this move can be kind of blocked by second player.

Let's see: First player can start with 'a'. Second must add 'b', we have 'ab'. First player goes with 'a', now our word is 'aba'. And at this moment second has a choice — 's' or 'c'. He can decide, that they will create word 'abacaba' instead of 'abas'.