結果

問題 No.231 めぐるはめぐる (1)
ユーザー lam6er
提出日時 2025-03-20 18:42:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 50 ms / 1,000 ms
コード長 428 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 82,488 KB
実行使用メモリ 61,664 KB
最終ジャッジ日時 2025-03-20 18:42:21
合計ジャッジ時間 1,408 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
max_e = 0
candidates = []

for i in range(1, n + 1):
    g, d = map(int, input().split())
    e = g - 30000 * d
    if e > max_e:
        max_e = e
        candidates = [i]
    elif e == max_e:
        candidates.append(i)

required = 30000 * 100  # 3,000,000
if max_e * 6 < required:
    print("NO")
else:
    print("YES")
    for h in range(6):
        idx = h % len(candidates)
        print(candidates[idx])
0