|Online MIPT programming contest||РУССКИЙ|
Time limit = 5 secondsYou are to determine the status of a position in Another Stone Game, that has the following rules.
There are k stone piles with n1, n2, ... , nk stones. One is permitted to take any positive number of stones from one pile for a move, but no more than half of the pile.
The one who can't make his move loses.
Input contains the number of piles and their sizes. k < 50, ni < 100 000.
Output either the string "First wins." or the string "Second wins." (without quotes).
3 3 2 1
4 1 3 7 63
Well-known problem. Added by Voroztsov Artem.
© acm.mipt DevGroup
The page was generated in 210ms