結果

問題 No.761 平均値ゲーム
ユーザー mkawa2mkawa2
提出日時 2021-02-10 13:13:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,175 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 11,020 KB
実行使用メモリ 17,652 KB
最終ジャッジ日時 2023-09-22 07:16:14
合計ジャッジ時間 8,199 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,204 KB
testcase_01 AC 17 ms
8,316 KB
testcase_02 AC 17 ms
8,356 KB
testcase_03 AC 18 ms
8,376 KB
testcase_04 AC 17 ms
8,272 KB
testcase_05 AC 17 ms
8,124 KB
testcase_06 WA -
testcase_07 AC 17 ms
8,272 KB
testcase_08 AC 16 ms
8,204 KB
testcase_09 WA -
testcase_10 AC 17 ms
8,128 KB
testcase_11 WA -
testcase_12 AC 16 ms
8,324 KB
testcase_13 AC 17 ms
8,268 KB
testcase_14 AC 17 ms
8,316 KB
testcase_15 AC 16 ms
8,312 KB
testcase_16 WA -
testcase_17 AC 16 ms
8,120 KB
testcase_18 WA -
testcase_19 AC 17 ms
8,336 KB
testcase_20 WA -
testcase_21 AC 17 ms
8,268 KB
testcase_22 AC 18 ms
8,232 KB
testcase_23 AC 18 ms
8,160 KB
testcase_24 WA -
testcase_25 AC 17 ms
8,308 KB
testcase_26 AC 17 ms
8,352 KB
testcase_27 AC 17 ms
8,232 KB
testcase_28 AC 18 ms
8,204 KB
testcase_29 AC 18 ms
8,160 KB
testcase_30 AC 17 ms
8,172 KB
testcase_31 AC 17 ms
8,264 KB
testcase_32 AC 17 ms
8,360 KB
testcase_33 AC 54 ms
14,964 KB
testcase_34 AC 63 ms
16,020 KB
testcase_35 AC 22 ms
8,744 KB
testcase_36 AC 41 ms
12,708 KB
testcase_37 AC 53 ms
14,404 KB
testcase_38 AC 53 ms
14,468 KB
testcase_39 WA -
testcase_40 AC 64 ms
16,140 KB
testcase_41 AC 61 ms
15,808 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 48 ms
13,936 KB
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 66 ms
16,480 KB
testcase_50 WA -
testcase_51 AC 22 ms
8,712 KB
testcase_52 AC 21 ms
8,688 KB
testcase_53 AC 65 ms
16,512 KB
testcase_54 AC 45 ms
13,808 KB
testcase_55 AC 67 ms
16,536 KB
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 AC 63 ms
16,244 KB
testcase_60 WA -
testcase_61 AC 73 ms
17,132 KB
testcase_62 AC 67 ms
16,596 KB
testcase_63 AC 27 ms
10,360 KB
testcase_64 AC 59 ms
15,676 KB
testcase_65 WA -
testcase_66 AC 21 ms
8,600 KB
testcase_67 WA -
testcase_68 WA -
testcase_69 WA -
testcase_70 AC 41 ms
12,712 KB
testcase_71 AC 28 ms
10,320 KB
testcase_72 WA -
testcase_73 WA -
testcase_74 WA -
testcase_75 WA -
testcase_76 WA -
testcase_77 WA -
testcase_78 WA -
testcase_79 WA -
testcase_80 AC 23 ms
9,200 KB
testcase_81 WA -
testcase_82 WA -
testcase_83 AC 72 ms
17,596 KB
testcase_84 WA -
testcase_85 WA -
testcase_86 AC 70 ms
17,652 KB
testcase_87 WA -
testcase_88 WA -
testcase_89 WA -
testcase_90 WA -
testcase_91 AC 69 ms
17,488 KB
testcase_92 WA -
testcase_93 AC 17 ms
8,160 KB
testcase_94 AC 17 ms
8,212 KB
testcase_95 AC 68 ms
17,552 KB
testcase_96 WA -
testcase_97 WA -
testcase_98 AC 65 ms
17,456 KB
testcase_99 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.buffer.readline())
def MI(): return map(int, sys.stdin.buffer.readline().split())
def MI1(): return map(int1, sys.stdin.buffer.readline().split())
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def LI1(): return list(map(int1, sys.stdin.buffer.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def BI(): return sys.stdin.buffer.readline().rstrip()
def SI(): return sys.stdin.buffer.readline().rstrip().decode()
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
dij = [[(-1, 0), (1, 0)], [(0, -1), (0, 1)]]
inf = 10**16
md = 998244353
# md = 10**9+7

def mid(l, r):
    while l+1 < r:
        m = (l+r)//2
        if cs[r]-cs[l] <= aa[m]*(r-l): r = m
        else: l = m
    return r

def win(l, r):
    if l == r: return False
    if aa[l] == aa[r-1]: return True
    m = mid(l, r)
    if m == l: return True
    if win(l, m) == False or win(m, r) == False: return True
    return False

n = II()
aa = LI()
cs = [0]
for a in aa: cs.append(cs[-1]+a)
print("First" if win(0, n) else "Second")
0