senthilshravan's blog

By senthilshravan, history, 7 years ago, In English

I tried solving 455B - A Lot of Games. I cannot understand solution for testcase 5.

4 2
aaaa
bbbb
ccccc
dumbavumba
Jury's answer : First

The output that I got is Second. During the first play, the first player writes "c", because that is the only way of winning for 1st player. So the second player is forced to continue to write "c" and eventually first player wins. And during the second iteration of the games, the second player starts because, he loses the first game resulting in his win. Is my way of understanding wrong of the problem, because for this testcase, the given output is First.

Full text and comments »

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