[CF1382B] 顺序 Nim 博弈 (Sequential Nim)
Problem Statement
There are piles of stones in a line with stones. Two players take turns removing any positive number of stones from the first non-empty pile. The player who cannot make a move loses. Determine the winner under optimal play.
Input
The first line contains (). Each test case consists of () followed by integers (). The sum of does not exceed .
Output
Print "First" if the first player wins, otherwise "Second".
Example
7
3
2 5 4
8
1 1 1 1 1 1 1 1
6
1 2 3 4 5 6
6
1 1 2 1 2 2
1
1000000000
5
1 2 2 1 1
3
1 1 1
First
Second
Second
First
First
Second
First
Note
- Constraints:,,,。
- Source:Codeforces 1382B · Sequential Nim