結果
| 問題 | No.2492 Knapsack Problem? | 
| コンテスト | |
| ユーザー |  prin_kemkem | 
| 提出日時 | 2023-10-06 21:22:52 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 88 ms / 2,000 ms | 
| コード長 | 655 bytes | 
| コンパイル時間 | 190 ms | 
| コンパイル使用メモリ | 82,112 KB | 
| 実行使用メモリ | 80,740 KB | 
| 最終ジャッジ日時 | 2024-07-26 15:38:37 | 
| 合計ジャッジ時間 | 1,858 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 | 
ソースコード
from collections import defaultdict, deque, Counter
import copy
from itertools import combinations, permutations, product, accumulate, groupby, chain
from heapq import heapify, heappop, heappush
import math
import bisect
from pprint import pprint
from random import randint
import sys
# sys.setrecursionlimit(700000)
input = lambda: sys.stdin.readline().rstrip('\n')
inf = float('inf')
mod1 = 10**9+7
mod2 = 998244353
def ceil_div(x, y): return -(-x//y)
#################################################
N, W = map(int, input().split())
ans = -1
for _ in range(N):
    v, w = map(int, input().split())
    if w <= W:
        ans = max(ans, v)
print(ans)
            
            
            
        