結果

問題 No.2492 Knapsack Problem?
ユーザー KudeKude
提出日時 2023-10-06 21:21:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 153 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 87,328 KB
実行使用メモリ 75,672 KB
最終ジャッジ日時 2023-10-06 21:21:39
合計ジャッジ時間 2,173 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
71,396 KB
testcase_01 AC 71 ms
71,348 KB
testcase_02 AC 72 ms
71,564 KB
testcase_03 AC 73 ms
71,584 KB
testcase_04 AC 72 ms
71,172 KB
testcase_05 AC 72 ms
71,396 KB
testcase_06 AC 77 ms
71,320 KB
testcase_07 AC 77 ms
71,164 KB
testcase_08 AC 77 ms
71,420 KB
testcase_09 AC 84 ms
75,672 KB
testcase_10 AC 84 ms
75,444 KB
testcase_11 AC 84 ms
75,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, w = map(int, input().split())
ans = -1
for _ in range(n):
    vi, wi = map(int, input().split())
    if wi <= w:
        ans = max(ans, vi)
print(ans)
0