<PREV Problem:
NEXT>
Solved by 302 users: ...
UserDateAttemptTimeCMSC
crazyb0y11 feb 2008C++800.71103 
crazyb0y22 jan 2008C++100.01119 
zhuojie29 oct 2009Python201.18120 
Woland13 may 2010Ruby400.08127 
bush07 mar 2006Ruby100.09135 
Philip_PV07 apr 2009C300.02142 
Woland13 may 2010Ruby300.08146 
david_it2112 dec 2008Ruby200.08151 
Philip_PV07 apr 2009C200.01153 
Madiyar_Tktl14 jan 2008C++800.01161 
UlyaNick23 mar 2009Ruby100.06163 
UlyaNick23 mar 2009Ruby200.06163 
Madiyar_Tktl14 jan 2008C++600.01164 
ich11 jul 2006C200.02165 
jx_wuyi04 may 2008C++100.01166 
Languages
C++
177
FPC
85
C
17
Java
12
Kylix
8
Ruby
4
Python
1
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Camomile Game -- who is the winner?

Time limit = 5 seconds

The Camomile Game has following rules. Camomile is a flower with N petals.

Two playes make their moves in turn. For a move a player can pull out any petal or two petals growing side by side.

The player who can't make move looses.

It's easy to find out that the second player has winning strategy for N > 2.

We have M camomiles each with one petal pulled out. Your program should determine who has winning strategy in this game.

Input The number of camomiles M, 1 ≤ M ≤ 10 folowed by M lines with numbers of petals on camomiles Ni ( Ni < 200 ).

Output Line with "First wins." or "Second wins.".

Input#1
1
10
Output#1
First wins.
Input#2
2
10
10
Output#2
Second wins.
Input#3
3
6
7
8
Output#3
Second wins.

Author:
Voroztsov Artem

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 190ms

SW soft NIX
ID = 3.92.74.105