結果
| 問題 | 
                            No.1905 PURE PHRASE
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-04-15 22:10:55 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 819 bytes | 
| コンパイル時間 | 360 ms | 
| コンパイル使用メモリ | 82,432 KB | 
| 実行使用メモリ | 82,304 KB | 
| 最終ジャッジ日時 | 2024-12-25 00:50:39 | 
| 合計ジャッジ時間 | 14,434 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 34 WA * 4 | 
ソースコード
n = int(input())
a = list(map(int,input().split()))
import random
ll = []
for _ in range(500):
    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) >= 90 * random.uniform(0.8, 1.0):
            peek.append(i)
    peek = peek[1:]
    l = len(peek)
    if l <= 2: continue
    f = 0
    for i in range(l - 1):
        f += n / (peek[i + 1] - peek[i])
    f = f / (l - 1)
    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])