• + 1 comment

    There are some soldiers placed on the map at some locations - which we know beforehand. We also know how the map is constructed - note that all paths are one way.

    For Example, in the first test case, there are four soldiers each at locations 4,6,7 and 10. There is no path from 4 and 10. There is only one path from 6 (to 8). There are three choices for location 7 (to 4,6,8).

    Bumi starts and will choose the path 7->6, then Iroh chooses 6->8 (there are 2 such soldiers at 6 - so only one is moved to 8). Bumi then moves the other soldier at 6 to 8.

    Now, there are no more possibilities of movement. Hence, Bumi wins.