|Online MIPT programming contest||РУССКИЙ|
Time limit: 3 seconds.
You are to detect the status of the position in the Nim Game. There are stone piles: n1, n2, ... , nk. The ni gives the number of stones in the i-th pile. You are permited to take any quantity of stones from one pile for a move. Who takes the last stone(s) wins.
Input is the number of piles and piles sizes. k < 50, ni < 230.
Output is either "First wins." or "Second wins." without quots.
3 3 2 1
3 5 2 1
© acm.mipt DevGroup
The page was generated in 200ms