| Udmurt SU Contest 2010 |
|---|
| Finished |
Two players play the following game. There are $$$n$$$ heaps of stones, where $$$i$$$-th heap has $$$a_i$$$ stones. The players make moves in turn. On the each turn the active player chooses the heap and removes an arbitrary positive number of stones. The player removing the last stone will lose the game.
For the given starting position determine if the first player will win and if it is true find the winning move. Consider that two players play optimally.
The first line has one integer $$$n$$$ ($$$1 \leq n \leq 100$$$) denotes the number of heaps.
The second line has $$$n$$$ integer numbers $$$a_i$$$ ($$$1 \leq a_i \leq 100$$$) that is equal to number of stones in the $$$i$$$-th heap.
Output "Lose" if the player who goes first lose the game and "Win" otherwise.
If the first players wins the second line should contain two integers equal to the index of the heap and the number of stones to be removed from the heap on the first turn, respectively.
2 3 3
Lose
2 3 2
Win 1 1
3 3 3 3
Win 1 3
| Name |
|---|


