結果
問題 | No.761 平均値ゲーム |
ユーザー | matsu7874 |
提出日時 | 2018-12-07 20:54:25 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 311 ms / 2,000 ms |
コード長 | 567 bytes |
コンパイル時間 | 152 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 22,180 KB |
最終ジャッジ日時 | 2024-09-14 03:36:39 |
合計ジャッジ時間 | 16,089 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 30 ms
10,880 KB |
testcase_01 | AC | 32 ms
10,752 KB |
testcase_02 | AC | 30 ms
10,880 KB |
testcase_03 | AC | 30 ms
10,752 KB |
testcase_04 | AC | 30 ms
10,752 KB |
testcase_05 | AC | 31 ms
10,880 KB |
testcase_06 | AC | 31 ms
10,752 KB |
testcase_07 | AC | 30 ms
10,880 KB |
testcase_08 | AC | 31 ms
10,624 KB |
testcase_09 | AC | 31 ms
10,752 KB |
testcase_10 | AC | 31 ms
10,752 KB |
testcase_11 | AC | 30 ms
10,752 KB |
testcase_12 | AC | 31 ms
10,624 KB |
testcase_13 | AC | 31 ms
10,752 KB |
testcase_14 | AC | 31 ms
10,752 KB |
testcase_15 | AC | 31 ms
10,752 KB |
testcase_16 | AC | 31 ms
10,752 KB |
testcase_17 | AC | 32 ms
10,752 KB |
testcase_18 | AC | 31 ms
10,752 KB |
testcase_19 | AC | 31 ms
10,752 KB |
testcase_20 | AC | 31 ms
10,752 KB |
testcase_21 | AC | 30 ms
10,624 KB |
testcase_22 | AC | 31 ms
10,624 KB |
testcase_23 | AC | 30 ms
10,624 KB |
testcase_24 | AC | 30 ms
10,624 KB |
testcase_25 | AC | 31 ms
10,752 KB |
testcase_26 | AC | 31 ms
10,880 KB |
testcase_27 | AC | 30 ms
10,752 KB |
testcase_28 | AC | 30 ms
10,624 KB |
testcase_29 | AC | 31 ms
10,880 KB |
testcase_30 | AC | 31 ms
10,752 KB |
testcase_31 | AC | 30 ms
10,752 KB |
testcase_32 | AC | 30 ms
10,752 KB |
testcase_33 | AC | 225 ms
19,044 KB |
testcase_34 | AC | 254 ms
20,428 KB |
testcase_35 | AC | 48 ms
11,776 KB |
testcase_36 | AC | 150 ms
16,012 KB |
testcase_37 | AC | 215 ms
18,472 KB |
testcase_38 | AC | 213 ms
18,320 KB |
testcase_39 | AC | 269 ms
20,288 KB |
testcase_40 | AC | 268 ms
20,564 KB |
testcase_41 | AC | 251 ms
19,812 KB |
testcase_42 | AC | 278 ms
20,852 KB |
testcase_43 | AC | 70 ms
12,416 KB |
testcase_44 | AC | 181 ms
16,900 KB |
testcase_45 | AC | 246 ms
19,440 KB |
testcase_46 | AC | 140 ms
15,180 KB |
testcase_47 | AC | 146 ms
15,684 KB |
testcase_48 | AC | 42 ms
11,392 KB |
testcase_49 | AC | 277 ms
21,076 KB |
testcase_50 | AC | 58 ms
11,904 KB |
testcase_51 | AC | 45 ms
11,648 KB |
testcase_52 | AC | 49 ms
11,520 KB |
testcase_53 | AC | 279 ms
20,564 KB |
testcase_54 | AC | 170 ms
16,472 KB |
testcase_55 | AC | 278 ms
20,724 KB |
testcase_56 | AC | 99 ms
14,416 KB |
testcase_57 | AC | 283 ms
20,684 KB |
testcase_58 | AC | 67 ms
12,408 KB |
testcase_59 | AC | 258 ms
19,804 KB |
testcase_60 | AC | 98 ms
14,284 KB |
testcase_61 | AC | 298 ms
21,164 KB |
testcase_62 | AC | 284 ms
20,636 KB |
testcase_63 | AC | 79 ms
13,564 KB |
testcase_64 | AC | 249 ms
19,924 KB |
testcase_65 | AC | 118 ms
14,704 KB |
testcase_66 | AC | 45 ms
11,392 KB |
testcase_67 | AC | 98 ms
14,532 KB |
testcase_68 | AC | 56 ms
12,032 KB |
testcase_69 | AC | 225 ms
18,480 KB |
testcase_70 | AC | 154 ms
15,768 KB |
testcase_71 | AC | 84 ms
13,536 KB |
testcase_72 | AC | 52 ms
11,776 KB |
testcase_73 | AC | 109 ms
14,688 KB |
testcase_74 | AC | 79 ms
13,520 KB |
testcase_75 | AC | 142 ms
15,268 KB |
testcase_76 | AC | 97 ms
14,292 KB |
testcase_77 | AC | 221 ms
18,316 KB |
testcase_78 | AC | 153 ms
15,980 KB |
testcase_79 | AC | 73 ms
13,268 KB |
testcase_80 | AC | 61 ms
12,232 KB |
testcase_81 | AC | 58 ms
12,032 KB |
testcase_82 | AC | 185 ms
16,992 KB |
testcase_83 | AC | 307 ms
21,700 KB |
testcase_84 | AC | 309 ms
21,700 KB |
testcase_85 | AC | 304 ms
21,700 KB |
testcase_86 | AC | 309 ms
21,828 KB |
testcase_87 | AC | 309 ms
21,696 KB |
testcase_88 | AC | 303 ms
21,700 KB |
testcase_89 | AC | 308 ms
21,700 KB |
testcase_90 | AC | 310 ms
21,704 KB |
testcase_91 | AC | 311 ms
21,576 KB |
testcase_92 | AC | 310 ms
21,696 KB |
testcase_93 | AC | 30 ms
10,752 KB |
testcase_94 | AC | 31 ms
10,624 KB |
testcase_95 | AC | 113 ms
21,696 KB |
testcase_96 | AC | 122 ms
21,568 KB |
testcase_97 | AC | 118 ms
22,148 KB |
testcase_98 | AC | 184 ms
21,076 KB |
testcase_99 | AC | 214 ms
22,180 KB |
ソースコード
# assert用 import bisect n = int(input()) a = list(map(int, input().split())) assert 1 <= n <= 10**5 assert len(a) == n assert all(1 <= a[i] <= a[i+1] <= 10**12 for i in range(n-1)) 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 a[r-1] == a[l]: return True th = bisect.bisect_left(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')