<PREV Problem:
NEXT>
Solved by 356 users: ...
UserDateAttemptTimeCMSC
crazyb0y11 feb 2008C++300.0143 
crazyb0y22 jan 2008C++200.0144 
daniel.ugra06 jan 2007Ruby200.0248 
david_it2119 apr 2008Ruby300.0251 
old111 dec 2006C++1100.0155 
old111 dec 2006C++800.0156 
old111 dec 2006C++1000.0156 
old111 dec 2006C++900.0157 
NDAT18 nov 2006FPC100.0158 
Vladislav_Simonenko20 apr 2006C++300.0158 
nt_d218 nov 2006FPC300.0158 
ignat10 aug 2007C++700.0158 
Skyslars19 nov 2006FPC1500.0158 
MasterYoda06 apr 2009C++1700.0158 
daniel.ugra06 jan 2007Ruby100.0258 
Languages
C++
213
FPC
77
C
34
Java
18
Kylix
13
Ruby
6
Python
2
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Nim Game - Give Away!

Time limit: 3 seconds.

You are to determine the status of a position in Inversed Nim Game, that has the following rules.

There are four stone piles with n1, n2, n3, n4 stones. One is permitted to take any number of stones from one pile for a move. The one who takes the last stone(s) LOOSES.

Input consists of four integers ni, each less than 2^30.

Output either the string "First wins." or the string "Second wins." (without quotes).

SAMPLE INPUT #1:

1 0 0 0

SAMPLE OUTPUT #1

Second wins. 

SAMPLE INPUT #2:

3 2 1 0

SAMPLE OUTPUT #2

Second wins. 

Authors:
Voroztsov Artem

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


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

SW soft NIX
ID = 18.208.202.194