結果
問題 | No.1905 PURE PHRASE |
ユーザー | dn6049949 |
提出日時 | 2022-04-15 21:44:30 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 947 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 10,880 KB |
実行使用メモリ | 34,792 KB |
最終ジャッジ日時 | 2023-08-26 07:44:09 |
合計ジャッジ時間 | 8,169 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 153 ms
33,984 KB |
testcase_01 | AC | 152 ms
34,776 KB |
testcase_02 | AC | 153 ms
34,604 KB |
testcase_03 | AC | 153 ms
34,380 KB |
testcase_04 | AC | 152 ms
34,548 KB |
testcase_05 | AC | 153 ms
34,536 KB |
testcase_06 | AC | 155 ms
34,540 KB |
testcase_07 | AC | 153 ms
34,572 KB |
testcase_08 | AC | 154 ms
34,424 KB |
testcase_09 | AC | 151 ms
34,380 KB |
testcase_10 | AC | 151 ms
34,252 KB |
testcase_11 | AC | 153 ms
34,468 KB |
testcase_12 | AC | 152 ms
34,704 KB |
testcase_13 | AC | 151 ms
34,624 KB |
testcase_14 | AC | 153 ms
34,520 KB |
testcase_15 | AC | 153 ms
34,216 KB |
testcase_16 | AC | 157 ms
34,648 KB |
testcase_17 | AC | 157 ms
34,792 KB |
testcase_18 | AC | 152 ms
34,676 KB |
testcase_19 | AC | 152 ms
34,500 KB |
testcase_20 | AC | 152 ms
34,468 KB |
testcase_21 | AC | 155 ms
34,640 KB |
testcase_22 | AC | 151 ms
34,436 KB |
testcase_23 | AC | 154 ms
34,720 KB |
testcase_24 | AC | 153 ms
34,772 KB |
testcase_25 | AC | 153 ms
34,456 KB |
testcase_26 | AC | 151 ms
34,640 KB |
testcase_27 | AC | 152 ms
34,588 KB |
testcase_28 | AC | 156 ms
34,688 KB |
testcase_29 | AC | 153 ms
34,384 KB |
testcase_30 | AC | 152 ms
34,564 KB |
testcase_31 | AC | 153 ms
34,784 KB |
testcase_32 | WA | - |
testcase_33 | AC | 154 ms
34,716 KB |
testcase_34 | AC | 152 ms
34,508 KB |
testcase_35 | AC | 152 ms
34,720 KB |
testcase_36 | AC | 151 ms
34,624 KB |
testcase_37 | WA | - |
testcase_38 | AC | 152 ms
34,544 KB |
testcase_39 | AC | 154 ms
34,712 KB |
testcase_40 | AC | 152 ms
34,484 KB |
ソースコード
#!usr/bin/env python3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations, accumulate import sys import math import bisect import numpy as np def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def IR(n): return [I() for _ in range(n)] def LIR(n): return [LI() for _ in range(n)] sys.setrecursionlimit(1000000) mod = 1000000007 hz = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5] ch = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"] def main(): n = I() a = np.array(LI()) acf = np.fft.ifft(a**2).real max_ = 0 argmax = None for index,f in enumerate(hz): i = round(f) s = 0 for j in range(i-3,i+4): s += abs(acf[j]) if max_ < s: max_ = s argmax = index print(ch[argmax]) return if __name__ == "__main__": main()