結果
| 問題 | No.761 平均値ゲーム |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2026-08-03 02:16:01 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 508 bytes |
| 記録 | |
| コンパイル時間 | 85 ms |
| コンパイル使用メモリ | 64,740 KB |
| 実行使用メモリ | 79,284 KB |
| 最終ジャッジ日時 | 2026-10-22 12:54:04 |
| 合計ジャッジ時間 | 11,923 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 100 WA * 1 |
ソースコード
import sys
input = sys.stdin.readline
from bisect import bisect,bisect_left
N=int(input())
A=list(map(int,input().split()))
S=[0]
for a in A:
S.append(S[-1]+a)
def calc(l,r,te):
if r-l+1==1:
return te
SUM=S[r+1]-S[l]
ko=r-l+1
k=bisect_left(A,SUM/ko)
if k==l:
return te
if calc(l,k-1,te^1)==te or calc(k,r,te^1)==te:
return te
else:
return te^1
ANS=calc(0,N-1,0)
if ANS==0:
print("First")
else:
print("Second")
titia