問題一覧 > 通常問題

No.1945 Go Push!

レベル : / AI推定難易度 : 353 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 188
作問者 : H20 / テスター : 蜜蜂 MtSaka
お気に入りにしたユーザー ProblemId : 7810 / 自分の提出
問題文最終更新日: 2022-05-02 11:47:11
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 344 (順位表) の他の問題:

Problem Statement

Do you know the popular toy "Go Pop!"? It comes in various shapes; one example is a toy shaped like the following.


One way to play with this toy is a game for two players.

Initially, all buttons can be pressed. A button that has been pressed cannot be pressed again.

Starting with the first player, the players alternately perform the following operation, repeating until one of them can no longer press a button.

Operation: Choose one column that still has a button that can be pressed. Press buttons that can be pressed in the chosen column. Here, if unpressed buttons are consecutive, several of them may be pressed together at once.

The player who first becomes unable to perform the operation loses. (Note: some rules differ from the real game.)

Now, as is the way of the world, once a toy sells well and becomes popular, cheap imitations start to circulate.

The enterprising DHMO has decided to create "Go Push!", an imitation of "Go Pop!".

Feeling that a misshapen appearance would hurt sales, DHMO will make it vertically symmetric.

The "Go Push!" to be created has $N$ columns, and column $i$ has $A_i$ buttons. $A_1, A_2, \ldots, A_N$ and $A_N, A_{N-1}, \ldots, A_1$ are equal sequences.

Given the input describing this "Go Push!", output which player wins under the above rules when the first and second players both play optimally.

Input

$N$
$A_1$ $A_2$ $\ldots$ $A_N$

Constraints

  • $ 1 \le N \le 2\times10^{5}$
  • $ 1 \le A_i \le 10^{9}$
  • $A_1, A_2, \ldots, A_N$ and $A_N, A_{N-1}, \ldots, A_1$ are equal sequences
  • All inputs are integers

Output

Output First if the first player wins with optimal play, or Second if the second player wins.

Print a newline at the end.

Sample

Sample 1
Input
6
3 5 6 6 5 3
Output
Second

This is the pattern in the image.

Sample 2
Input
3
1 1 1
Output
First
Sample 3
Input
7
1341907 412412 97901 295132 97901 412412 1341907
Output
First

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。