問題一覧 > 通常問題

No.761 Average Game

レベル : / AI推定難易度 : 1525 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 71
作問者 : butsurizuki / テスター : matsu7874
お気に入りにしたユーザー ProblemId : 2552 / 自分の提出
問題文最終更新日: 2018-12-07 13:07:33
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
Advent Calendar Contest 2018 (順位表) の他の問題:

Note

This is the problem for day 9 of Advent Calendar Contest 2018.

Problem

Butsurizuki-san came up with the following game.

First, prepare $N$ natural numbers $A_i$.
A player can perform one of the following operations.
(i) Delete all natural numbers that are greater than or equal to the average.
(ii) Delete all natural numbers that are less than the average.

Starting with the first player, the players take turns performing an operation, and the player who first becomes unable to perform an operation loses.
Note that an operation that deletes no numbers cannot be performed.

Determine which player wins when both players play optimally.

Input

$N$
$A_1$ $A_2$ $...$ $A_N$

・Constraints
$1 \le N \le 10^5$
$1 \le A_i \le 10^{12}(1 \le i \le N)$
$A_i \le A_{i+1}(1 \le i < N)$

Output

Print First if the first player wins and Second if the second player wins, followed by a newline.

Sample

Sample 1
Input
5
1 2 3 5 8
Output
First

If the first player deletes 1,2,3 first, then whichever of 5,8 the second player deletes, the first player can win by deleting the other one.

Sample 2
Input
7
1 3 3 4 575 1333 1640
Output
Second

Sample 3
Input
1
20181209
Output
First

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