結果

問題 No.2492 Knapsack Problem?
ユーザー MottchanMottchan
提出日時 2023-10-06 21:41:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,216 KB
実行使用メモリ 76,360 KB
最終ジャッジ日時 2023-10-06 21:41:52
合計ジャッジ時間 2,078 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,344 KB
testcase_01 AC 71 ms
71,200 KB
testcase_02 AC 71 ms
71,388 KB
testcase_03 AC 71 ms
71,484 KB
testcase_04 AC 70 ms
71,428 KB
testcase_05 AC 69 ms
71,420 KB
testcase_06 AC 77 ms
71,460 KB
testcase_07 AC 75 ms
71,380 KB
testcase_08 AC 75 ms
71,292 KB
testcase_09 AC 86 ms
76,360 KB
testcase_10 AC 90 ms
76,316 KB
testcase_11 AC 89 ms
76,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,w = map(int,input().split())
l = [list(map(int,input().split())) for _ in range(n)]

ans = -1
for a,b in l:
    if b<=w:
        ans = max(ans, a)

print(ans)
0