結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,360 KB
testcase_01 AC 16 ms
8,332 KB
testcase_02 AC 15 ms
8,336 KB
testcase_03 AC 15 ms
8,156 KB
testcase_04 AC 16 ms
8,332 KB
testcase_05 AC 15 ms
8,340 KB
testcase_06 WA -
testcase_07 AC 16 ms
8,296 KB
testcase_08 AC 15 ms
8,352 KB
testcase_09 WA -
testcase_10 AC 16 ms
8,344 KB
testcase_11 WA -
testcase_12 AC 15 ms
8,352 KB
testcase_13 AC 16 ms
8,292 KB
testcase_14 AC 15 ms
8,348 KB
testcase_15 AC 16 ms
8,388 KB
testcase_16 WA -
testcase_17 AC 16 ms
8,188 KB
testcase_18 WA -
testcase_19 AC 15 ms
8,296 KB
testcase_20 WA -
testcase_21 AC 15 ms
8,280 KB
testcase_22 AC 16 ms
8,336 KB
testcase_23 AC 16 ms
8,240 KB
testcase_24 WA -
testcase_25 AC 16 ms
8,376 KB
testcase_26 AC 15 ms
8,292 KB
testcase_27 AC 16 ms
8,184 KB
testcase_28 AC 15 ms
8,192 KB
testcase_29 AC 15 ms
8,392 KB
testcase_30 AC 16 ms
8,148 KB
testcase_31 AC 16 ms
8,332 KB
testcase_32 AC 16 ms
8,252 KB
testcase_33 AC 50 ms
14,848 KB
testcase_34 AC 58 ms
16,004 KB
testcase_35 AC 20 ms
8,704 KB
testcase_36 AC 38 ms
12,624 KB
testcase_37 AC 49 ms
14,484 KB
testcase_38 AC 49 ms
14,420 KB
testcase_39 WA -
testcase_40 AC 58 ms
16,260 KB
testcase_41 AC 55 ms
15,664 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 44 ms
13,952 KB
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 60 ms
16,616 KB
testcase_50 WA -
testcase_51 AC 19 ms
8,692 KB
testcase_52 AC 19 ms
8,824 KB
testcase_53 AC 60 ms
16,516 KB
testcase_54 AC 43 ms
13,672 KB
testcase_55 AC 62 ms
16,580 KB
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 AC 58 ms
16,216 KB
testcase_60 WA -
testcase_61 AC 67 ms
17,124 KB
testcase_62 AC 61 ms
16,768 KB
testcase_63 AC 24 ms
10,364 KB
testcase_64 AC 53 ms
15,832 KB
testcase_65 WA -
testcase_66 AC 19 ms
8,624 KB
testcase_67 WA -
testcase_68 WA -
testcase_69 WA -
testcase_70 AC 38 ms
12,832 KB
testcase_71 AC 26 ms
10,344 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 68 ms
17,680 KB
testcase_84 WA -
testcase_85 WA -
testcase_86 AC 67 ms
17,440 KB
testcase_87 WA -
testcase_88 WA -
testcase_89 WA -
testcase_90 WA -
testcase_91 AC 65 ms
17,524 KB
testcase_92 WA -
testcase_93 AC 16 ms
8,364 KB
testcase_94 AC 16 ms
8,248 KB
testcase_95 AC 63 ms
17,564 KB
testcase_96 WA -
testcase_97 WA -
testcase_98 AC 61 ms
17,632 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):
    if aa[l]==aa[r-1]:return l
    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
    m = mid(l, r)
    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