|Online MIPT programming contest||РУССКИЙ|
Time limit = 5You are to determine the status of a position in Stone Game, that has the following rules.
There are k stone piles with n1, n2, ... , nk stones. One is permitted to take 2m stones from one pile for a move. The one who takes the last stone(s) wins.
Input contains the number of piles and their sizes delimited with spaces or/and newline symbols. k < 50, ni < 10200.
Output either the string "First wins." or the string "Second wins." (without quotes).
3 3 2 1
5 111 777 777 9999999999 9999999999
Well-known problem. Added by Voroztsov Artem.
© acm.mipt DevGroup
The page was generated in 220ms