結果

問題 No.231 めぐるはめぐる (1)
ユーザー iad_2889iad_2889
提出日時 2019-05-30 01:35:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 562 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 11,808 KB
実行使用メモリ 18,816 KB
最終ジャッジ日時 2023-10-17 18:48:48
合計ジャッジ時間 5,013 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations_with_replacement as cmb

NEXT_LEVEL = 3000000
PENALTY = 30000


def round_1h(exp, death):
    return exp-PENALTY*death


N = int(input())
stage = [round_1h(*map(int, input().split())) for x in range(N)]
stage = [(i+1, x) for i, x in enumerate(stage) if x > 0]
ans = "NO"
if stage:
    for cb in cmb(stage, 6):
        temp = NEXT_LEVEL
        lst = []
        for i, score in cb:
            temp -= score
            lst.append(i)
        if temp <= 0:
            ans = "\n".join(map(str, lst))
            break
print(ans)
0