AtCoder Grand Contest 048
D
Pocky Game
AtCoder
⌀ 3046
原题
← CE →
翻译中…

Problem Statement

翻译中…

There are $N$ piles of stones lying in a row. The $i$-th pile from the left contains $A_i$ stones.

翻译中…

Two players, FirstLeft and SecondRight, play a game. They alternately play a turn, with FirstLeft going first. In each turn, the player does the following operation:

翻译中…
  • In FirstLeft's turn: he removes one or more stones from the leftmost pile with one or more stones.
  • In SecondRight's turn: he removes one or more stones from the rightmost pile with one or more stones.
翻译中…

The player who becomes unable to play his turn loses. Determine the winner of the game when the players act optimally.

翻译中…

Solve $T$ test cases in an input file.

翻译中…

Constraints

翻译中…
  • $1 \leq T \leq 100$
  • $1 \leq N \leq 100$
  • $1 \leq A_i \leq 10^9$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format. The first line of input is as follows:

翻译中…

T

翻译中…

Then, $T$ test cases follow, each of which is in the following format:

翻译中…

N
A_1 A_2 \cdots A_N

翻译中…

Output

翻译中…

For each test case, print First if FirstLeft wins, and print Second if SecondRight wins. Use one line for each case.

翻译中…

样例

Input #1
3
1
10
2
3 2
3
2 1 2
Output #1
First
First
Second
For example, in the third game, one possible scenario is as follows: - FirstLeft takes $2$ stones from the leftmost pile. The piles now contain $0,1,2$ stone(s). - SecondRight takes $1$ stone from the rightmost pile. The piles now contain $0,1,1$ stone(s). - FirstLeft takes $1$ stone from the middle pile. The piles now contain $0,0,1$ stone(s). - SecondRight takes $1$ stone from the rightmost pile. The piles now contain $0,0,0$ stones. - FirstLeft is unable to do his operation and loses.
题目信息
题号
agc048_d
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。