結果
問題 | No.2492 Knapsack Problem? |
ユーザー |
![]() |
提出日時 | 2023-11-12 23:03:46 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 49 ms / 2,000 ms |
コード長 | 176 bytes |
コンパイル時間 | 161 ms |
コンパイル使用メモリ | 82,280 KB |
実行使用メモリ | 61,568 KB |
最終ジャッジ日時 | 2024-09-26 03:05:46 |
合計ジャッジ時間 | 1,227 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
N,W = map(int,input().split())ans = 0for i in range(N):v,w = map(int,input().split())if w<=W:ans=max(ans,v)if ans==0:print(-1)else:print(ans)