結果

問題 No.1905 PURE PHRASE
ユーザー ShirotsumeShirotsume
提出日時 2022-04-15 22:17:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,070 ms / 2,000 ms
コード長 820 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,456 KB
実行使用メモリ 85,116 KB
最終ジャッジ日時 2023-08-26 08:09:58
合計ジャッジ時間 27,290 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 509 ms
84,656 KB
testcase_01 AC 432 ms
84,792 KB
testcase_02 AC 581 ms
84,456 KB
testcase_03 AC 512 ms
84,796 KB
testcase_04 AC 1,066 ms
84,692 KB
testcase_05 AC 444 ms
84,888 KB
testcase_06 AC 466 ms
84,880 KB
testcase_07 AC 475 ms
84,848 KB
testcase_08 AC 532 ms
85,116 KB
testcase_09 AC 462 ms
84,796 KB
testcase_10 AC 487 ms
84,952 KB
testcase_11 AC 622 ms
85,028 KB
testcase_12 AC 541 ms
84,404 KB
testcase_13 AC 634 ms
84,972 KB
testcase_14 AC 552 ms
84,620 KB
testcase_15 AC 482 ms
84,752 KB
testcase_16 AC 562 ms
84,796 KB
testcase_17 AC 590 ms
84,692 KB
testcase_18 AC 548 ms
84,308 KB
testcase_19 AC 563 ms
84,472 KB
testcase_20 AC 508 ms
84,720 KB
testcase_21 AC 550 ms
84,680 KB
testcase_22 AC 542 ms
84,324 KB
testcase_23 AC 619 ms
85,008 KB
testcase_24 AC 500 ms
84,568 KB
testcase_25 AC 541 ms
84,768 KB
testcase_26 AC 505 ms
84,784 KB
testcase_27 AC 516 ms
84,860 KB
testcase_28 AC 556 ms
84,688 KB
testcase_29 AC 494 ms
84,760 KB
testcase_30 AC 549 ms
84,724 KB
testcase_31 AC 707 ms
84,276 KB
testcase_32 AC 1,070 ms
84,384 KB
testcase_33 AC 554 ms
85,104 KB
testcase_34 AC 498 ms
84,776 KB
testcase_35 AC 458 ms
84,760 KB
testcase_36 AC 561 ms
84,300 KB
testcase_37 AC 1,023 ms
84,692 KB
testcase_38 AC 528 ms
84,756 KB
testcase_39 AC 544 ms
84,772 KB
testcase_40 AC 516 ms
84,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))
import random
ll = []
for _ in range(2000):
    shikii = round(max(a) * random.uniform(0.7, 0.9))

    peek = [-10 ** 9]
    for i in range(100, n - 100):
        if a[i] >= shikii and abs(peek[-1] - i) >= 89:
            peek.append(i)

    peek = peek[1:]
    l = len(peek)
    if l <= 5: continue
    f = []
    for i in range(l - 1):
        f.append(n / (peek[i + 1] - peek[i]))
    f.sort()
    f = f[round(3 * l / 4)]

    sa = 10 ** 9
    ans = None
    li = [(261.6, 'C4'), (294.3, 'D4'), (327.0, 'E4'), (348.8, 'F4'), (392.4, 'G4'), (436.0, 'A4'), (490.5, 'B4')]

    for v, c in li:
        if abs(f - v) < sa:
            sa = abs(f - v)
            ans = c
    ll.append(ans)
from collections import Counter

ll = Counter(ll)
print(ll.most_common()[0][0])
0