結果

問題 No.1905 PURE PHRASE
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2022-04-15 23:16:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 843 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 86,608 KB
実行使用メモリ 82,212 KB
最終ジャッジ日時 2023-08-26 08:44:33
合計ジャッジ時間 10,446 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 199 ms
82,212 KB
testcase_01 AC 203 ms
81,996 KB
testcase_02 AC 198 ms
82,072 KB
testcase_03 AC 202 ms
81,628 KB
testcase_04 AC 203 ms
82,008 KB
testcase_05 AC 200 ms
81,852 KB
testcase_06 AC 205 ms
81,688 KB
testcase_07 WA -
testcase_08 AC 202 ms
82,208 KB
testcase_09 AC 207 ms
81,692 KB
testcase_10 AC 201 ms
81,852 KB
testcase_11 AC 196 ms
81,628 KB
testcase_12 WA -
testcase_13 AC 197 ms
81,852 KB
testcase_14 WA -
testcase_15 AC 202 ms
82,128 KB
testcase_16 WA -
testcase_17 AC 201 ms
81,848 KB
testcase_18 AC 201 ms
81,796 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 203 ms
81,872 KB
testcase_22 AC 197 ms
82,092 KB
testcase_23 AC 201 ms
82,072 KB
testcase_24 WA -
testcase_25 AC 202 ms
82,132 KB
testcase_26 AC 201 ms
82,004 KB
testcase_27 AC 201 ms
81,852 KB
testcase_28 WA -
testcase_29 AC 197 ms
81,932 KB
testcase_30 WA -
testcase_31 AC 208 ms
82,084 KB
testcase_32 AC 205 ms
82,180 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 205 ms
81,856 KB
testcase_36 AC 201 ms
81,840 KB
testcase_37 AC 206 ms
82,076 KB
testcase_38 WA -
testcase_39 AC 202 ms
81,808 KB
testcase_40 AC 216 ms
82,096 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

    for i in range(3*10**5):

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

        catL = get(L)
        catR = get(L+ONE)
        if catL != None and catR != None:
            nsum += abs(catL - catR)**2
            nnum += 1

    S.append( nsum / nnum )

MI = min(S)

print (S,file=sys.stderr)

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


        
0