結果
問題 | No.761 平均値ゲーム |
ユーザー |
![]() |
提出日時 | 2020-12-16 13:55:14 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 244 ms / 2,000 ms |
コード長 | 853 bytes |
コンパイル時間 | 332 ms |
コンパイル使用メモリ | 82,412 KB |
実行使用メモリ | 102,580 KB |
最終ジャッジ日時 | 2024-09-20 05:02:45 |
合計ジャッジ時間 | 13,405 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 100 |
ソースコード
import syssys.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 0if len(X) == 1:return 1ave = (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 1else:if f(X0) == f(X1) == 1:return 0else:return 1print('First' if f(A) else 'Second')