結果
問題 | No.2492 Knapsack Problem? |
ユーザー |
![]() |
提出日時 | 2023-10-06 21:27:13 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 48 ms / 2,000 ms |
コード長 | 592 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 82,028 KB |
実行使用メモリ | 64,192 KB |
最終ジャッジ日時 | 2024-07-26 15:42:46 |
合計ジャッジ時間 | 1,178 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
#############################################################import syssys.setrecursionlimit(10**7)from heapq import heappop,heappushfrom collections import deque,defaultdict,Counterfrom bisect import bisect_left, bisect_rightfrom itertools import product,combinations,permutationsipt = sys.stdin.readlinedef iin():return int(ipt())def lmin():return list(map(int,ipt().split()))MOD = 998244353#############################################################N,W = lmin()ans = -1for i in range(N):v,w = lmin()if w <= W:ans = max(ans,v)print(ans)