Online MIPT programming contest | РУССКИЙ |
<PREV Problem: | NEXT> |
< |
---|
Time limit = 5 seconds
You 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).
Input#13 3 2 1 |
Output#1First wins. |
Input#24 1 3 7 63 |
Output#2Second wins. |
Author:
Well-known problem. Added by Voroztsov Artem.
© acm.mipt DevGroup The page was generated in 200ms |