結果
問題 |
No.761 平均値ゲーム
|
ユーザー |
![]() |
提出日時 | 2021-05-21 00:31:31 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 428 bytes |
コンパイル時間 | 283 ms |
コンパイル使用メモリ | 82,452 KB |
実行使用メモリ | 97,240 KB |
最終ジャッジ日時 | 2024-10-10 07:23:22 |
合計ジャッジ時間 | 15,303 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 94 RE * 6 |
ソースコード
from bisect import bisect_left def f(L,R): if L+1==R: return 1 elif L+2==R: return int(a[L]==a[L+1]) s = acc[R] - acc[L] i = bisect_left(a,(s+R-L-1)//(R-L)) v = 0 if L < i and f(L,i)==0: v = 1 if i < R and f(i,R)==0: v = 1 return v n = int(input()) *a, = map(int,input().split()) acc = [0]+a[:] for i in range(1,n+1): acc[i] += acc[i-1] print("First" if f(0,n) else "Second")