結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
12,752 KB
testcase_01 AC 38 ms
13,280 KB
testcase_02 AC 38 ms
13,184 KB
testcase_03 AC 38 ms
13,164 KB
testcase_04 AC 41 ms
13,192 KB
testcase_05 AC 37 ms
13,332 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 39 ms
13,156 KB
testcase_09 AC 37 ms
13,172 KB
testcase_10 WA -
testcase_11 AC 38 ms
13,352 KB
testcase_12 AC 38 ms
13,484 KB
testcase_13 WA -
testcase_14 AC 38 ms
13,224 KB
testcase_15 AC 38 ms
13,348 KB
testcase_16 AC 39 ms
13,300 KB
testcase_17 WA -
testcase_18 AC 36 ms
13,448 KB
testcase_19 AC 39 ms
13,348 KB
testcase_20 AC 39 ms
13,304 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 40 ms
13,312 KB
testcase_25 AC 39 ms
13,240 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 38 ms
13,368 KB
testcase_29 AC 38 ms
13,284 KB
testcase_30 AC 38 ms
13,276 KB
testcase_31 WA -
testcase_32 AC 37 ms
13,432 KB
testcase_33 AC 38 ms
13,232 KB
testcase_34 AC 38 ms
13,260 KB
testcase_35 AC 40 ms
13,300 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 39 ms
13,268 KB
testcase_39 AC 40 ms
13,272 KB
testcase_40 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left
n = int(input())
a = list(map(int, input().split()))
l = sorted(a)[-50]
p = []
for i, v in enumerate(a):
    if v > l-500 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