結果

問題 No.761 平均値ゲーム
コンテスト
ユーザー ayaoni
提出日時 2020-12-16 13:55:14
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 159 ms / 2,000 ms
+ 672µs
コード長 853 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 101 ms
コンパイル使用メモリ 64,256 KB
実行使用メモリ 80,000 KB
最終ジャッジ日時 2026-10-19 21:37:46
合計ジャッジ時間 13,305 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 101
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()
A = LI()


def f(X):
    if len(X) == 0:
        return 0
    if len(X) == 1:
        return 1
    ave = (sum(X)+len(X)-1)//len(X)
    X0 = [x for x in X if x >= ave]
    X1 = [x for x in X if x < ave]
    if len(X0) == 0 or len(X1) == 0:
        return 1
    else:
        if f(X0) == f(X1) == 1:
            return 0
        else:
            return 1


print('First' if f(A) else 'Second')
0