結果

問題 No.1905 PURE PHRASE
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2022-04-15 23:22:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 857 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 82,448 KB
最終ジャッジ日時 2023-08-26 08:47:18
合計ジャッジ時間 9,012 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
81,700 KB
testcase_01 AC 153 ms
81,612 KB
testcase_02 AC 154 ms
81,716 KB
testcase_03 AC 155 ms
81,588 KB
testcase_04 AC 154 ms
81,908 KB
testcase_05 AC 153 ms
81,816 KB
testcase_06 AC 152 ms
81,720 KB
testcase_07 WA -
testcase_08 AC 152 ms
81,616 KB
testcase_09 AC 156 ms
81,756 KB
testcase_10 AC 154 ms
81,732 KB
testcase_11 AC 154 ms
81,916 KB
testcase_12 WA -
testcase_13 AC 153 ms
81,768 KB
testcase_14 WA -
testcase_15 AC 153 ms
81,596 KB
testcase_16 WA -
testcase_17 AC 161 ms
81,716 KB
testcase_18 AC 161 ms
81,916 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 158 ms
81,792 KB
testcase_22 AC 158 ms
81,788 KB
testcase_23 AC 159 ms
82,004 KB
testcase_24 WA -
testcase_25 AC 161 ms
81,860 KB
testcase_26 AC 161 ms
81,916 KB
testcase_27 AC 153 ms
82,012 KB
testcase_28 WA -
testcase_29 AC 152 ms
82,072 KB
testcase_30 WA -
testcase_31 AC 154 ms
81,684 KB
testcase_32 AC 152 ms
82,028 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 151 ms
82,008 KB
testcase_36 AC 153 ms
81,788 KB
testcase_37 AC 153 ms
81,748 KB
testcase_38 WA -
testcase_39 AC 152 ms
81,804 KB
testcase_40 AC 152 ms
81,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from sys import stdin
import math
import random

def get(idx):

    i = int(idx)
    rem = idx - i
    if i + 1 >= len(A) or i < 0:
        return None

    ret = A[i] * (1-rem) + A[i+1] * rem
    return ret

N = int(stdin.readline())

A = list(map(int,stdin.readline().split()))

DF = [261.6,294.3, 327.0, 348.8, 392.4, 436.0, 490.5]
DN = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"]

S = []

for freq in DF:

    ONE = N / freq
    nsum = 0
    nnum = 0
    diffmax = 0

    for i in range(10**5):

        L = random.uniform(0,N-1-ONE)

        catL = get(L)
        catR = get(L+ONE)

        
        if catL != None and catR != None:
            diffmax = max( diffmax , abs(catL - catR) )

    S.append( diffmax )

MI = min(S)

print (S,file=sys.stderr)

for i in range(6):
    if S[i] == MI:
        print (DN[i])
        break


        
0