結果

問題 No.1905 PURE PHRASE
ユーザー ニックネームニックネーム
提出日時 2022-04-15 22:44:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 473 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,936 KB
実行使用メモリ 13,540 KB
最終ジャッジ日時 2023-08-26 08:23:51
合計ジャッジ時間 3,486 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
12,788 KB
testcase_01 AC 41 ms
13,388 KB
testcase_02 AC 41 ms
13,260 KB
testcase_03 AC 41 ms
13,260 KB
testcase_04 AC 41 ms
13,216 KB
testcase_05 AC 41 ms
13,228 KB
testcase_06 AC 42 ms
13,220 KB
testcase_07 WA -
testcase_08 AC 42 ms
13,284 KB
testcase_09 AC 41 ms
13,216 KB
testcase_10 WA -
testcase_11 AC 42 ms
13,264 KB
testcase_12 AC 42 ms
13,348 KB
testcase_13 AC 43 ms
13,304 KB
testcase_14 AC 42 ms
13,332 KB
testcase_15 AC 42 ms
13,324 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 40 ms
13,496 KB
testcase_19 AC 41 ms
13,232 KB
testcase_20 AC 42 ms
13,156 KB
testcase_21 AC 41 ms
13,336 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 41 ms
13,208 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 42 ms
13,200 KB
testcase_28 AC 42 ms
13,340 KB
testcase_29 AC 42 ms
13,248 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 39 ms
13,348 KB
testcase_33 AC 40 ms
13,336 KB
testcase_34 AC 41 ms
13,152 KB
testcase_35 AC 42 ms
13,236 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 41 ms
13,152 KB
testcase_39 WA -
testcase_40 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left
n = int(input())
a = list(map(int, input().split()))
l = sorted(a)[-500]
p = []
for i, v in enumerate(a):
    if v > l and (not p or p[-1] < i-50): p.append(i)
d = [p[i+1]-p[i] for i in range(len(p)-1)]
m = len(d)//3
c = n/(sum(sorted(d)[m:2*m])/m)
h = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"]
f = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5]
i = bisect_left(f, c)
if i > 5: i = 5
print(h[i] if abs(c-f[i]) < abs(c-f[i+1]) else h[i+1])
0