結果

問題 No.761 平均値ゲーム
ユーザー matsu7874matsu7874
提出日時 2018-12-07 20:39:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,884 KB
実行使用メモリ 19,576 KB
最終ジャッジ日時 2023-10-12 04:02:03
合計ジャッジ時間 15,068 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,944 KB
testcase_01 AC 17 ms
7,944 KB
testcase_02 AC 16 ms
7,920 KB
testcase_03 AC 16 ms
7,936 KB
testcase_04 WA -
testcase_05 AC 16 ms
7,944 KB
testcase_06 AC 16 ms
7,956 KB
testcase_07 AC 16 ms
7,972 KB
testcase_08 AC 17 ms
7,976 KB
testcase_09 AC 16 ms
7,900 KB
testcase_10 AC 16 ms
7,852 KB
testcase_11 AC 16 ms
7,952 KB
testcase_12 AC 16 ms
7,940 KB
testcase_13 AC 16 ms
8,064 KB
testcase_14 AC 16 ms
7,856 KB
testcase_15 AC 16 ms
7,904 KB
testcase_16 AC 16 ms
7,936 KB
testcase_17 AC 16 ms
7,972 KB
testcase_18 AC 17 ms
7,944 KB
testcase_19 AC 16 ms
7,928 KB
testcase_20 AC 17 ms
7,912 KB
testcase_21 AC 16 ms
7,852 KB
testcase_22 AC 16 ms
7,948 KB
testcase_23 AC 16 ms
7,920 KB
testcase_24 WA -
testcase_25 AC 16 ms
8,080 KB
testcase_26 AC 17 ms
7,908 KB
testcase_27 AC 16 ms
7,936 KB
testcase_28 AC 17 ms
7,944 KB
testcase_29 WA -
testcase_30 AC 16 ms
7,984 KB
testcase_31 AC 17 ms
7,948 KB
testcase_32 AC 17 ms
7,932 KB
testcase_33 AC 175 ms
15,960 KB
testcase_34 AC 201 ms
17,212 KB
testcase_35 AC 30 ms
8,936 KB
testcase_36 AC 114 ms
13,140 KB
testcase_37 AC 163 ms
15,964 KB
testcase_38 AC 164 ms
15,636 KB
testcase_39 AC 210 ms
17,460 KB
testcase_40 AC 202 ms
17,392 KB
testcase_41 AC 191 ms
17,292 KB
testcase_42 AC 216 ms
17,872 KB
testcase_43 AC 48 ms
10,292 KB
testcase_44 AC 136 ms
14,440 KB
testcase_45 AC 192 ms
16,616 KB
testcase_46 AC 107 ms
13,192 KB
testcase_47 AC 110 ms
13,852 KB
testcase_48 AC 25 ms
8,684 KB
testcase_49 AC 213 ms
18,236 KB
testcase_50 AC 38 ms
9,436 KB
testcase_51 AC 28 ms
8,856 KB
testcase_52 AC 32 ms
8,960 KB
testcase_53 AC 218 ms
17,848 KB
testcase_54 AC 127 ms
13,596 KB
testcase_55 AC 222 ms
17,904 KB
testcase_56 AC 71 ms
11,524 KB
testcase_57 AC 218 ms
17,964 KB
testcase_58 AC 46 ms
10,228 KB
testcase_59 AC 203 ms
17,156 KB
testcase_60 AC 69 ms
11,576 KB
testcase_61 AC 232 ms
18,696 KB
testcase_62 AC 217 ms
17,992 KB
testcase_63 AC 55 ms
10,500 KB
testcase_64 AC 195 ms
16,800 KB
testcase_65 AC 87 ms
12,504 KB
testcase_66 AC 30 ms
8,904 KB
testcase_67 AC 70 ms
11,624 KB
testcase_68 AC 35 ms
9,360 KB
testcase_69 AC 170 ms
15,752 KB
testcase_70 AC 115 ms
12,960 KB
testcase_71 AC 59 ms
10,356 KB
testcase_72 AC 34 ms
9,228 KB
testcase_73 AC 78 ms
11,552 KB
testcase_74 AC 54 ms
10,224 KB
testcase_75 AC 105 ms
12,772 KB
testcase_76 AC 71 ms
11,608 KB
testcase_77 AC 173 ms
15,664 KB
testcase_78 AC 117 ms
12,964 KB
testcase_79 AC 50 ms
10,328 KB
testcase_80 AC 43 ms
10,104 KB
testcase_81 AC 38 ms
9,344 KB
testcase_82 AC 142 ms
14,276 KB
testcase_83 AC 242 ms
18,980 KB
testcase_84 AC 241 ms
18,888 KB
testcase_85 AC 240 ms
18,868 KB
testcase_86 AC 244 ms
18,976 KB
testcase_87 AC 241 ms
18,880 KB
testcase_88 AC 241 ms
18,876 KB
testcase_89 AC 241 ms
18,912 KB
testcase_90 AC 243 ms
19,020 KB
testcase_91 AC 241 ms
18,880 KB
testcase_92 AC 240 ms
18,792 KB
testcase_93 AC 16 ms
7,852 KB
testcase_94 AC 16 ms
7,948 KB
testcase_95 AC 76 ms
18,880 KB
testcase_96 AC 82 ms
18,872 KB
testcase_97 AC 76 ms
19,440 KB
testcase_98 AC 135 ms
19,576 KB
testcase_99 AC 157 ms
18,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

n = int(input())
a = list(map(int, input().split()))

b = [0] + a[:]
for i in range(n):
    b[i+1] += b[i]


def get_ave(l, r):
    return (b[r]-b[l])/(r-l)


def does_first_win(l, r):
    if l+1 == r or a[r-1] == a[l]:
        return True
    th = bisect.bisect_right(a, get_ave(l, r))
    l_hand = not does_first_win(l, th)
    r_hand = not does_first_win(th, r)
    return l_hand or r_hand


print('First' if does_first_win(0, n) else 'Second')
0