Page 1 of 1

1171 - Board Games

Posted: Thu Aug 21, 2014 12:07 am
by zholnin
Just a quick note for those solving above problem.
I wish I knew it before I started, as problem statement is loosely specified in my opinion. I would provide only information which I think should have been included in problem statement, so there is not spoiler alert.

- the game does not end when you land in final position - you can continue as long as you come back in the end. This means that if there is cycle which includes final position, you still should put out "infinity".

- it is not important whether person playing the game can actually get into negative cycle - wherever negative cycle exists on the board (even if area is inaccessible by player) you should put out "infinity"