結果
| 問題 | No.2492 Knapsack Problem? | 
| コンテスト | |
| ユーザー | 👑 | 
| 提出日時 | 2023-10-06 23:33:03 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 22 ms / 2,000 ms | 
| コード長 | 195 bytes | 
| コンパイル時間 | 848 ms | 
| コンパイル使用メモリ | 65,924 KB | 
| 最終ジャッジ日時 | 2025-02-17 05:42:39 | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 | 
ソースコード
#include <iostream>
using namespace std;
int main(){
	int n,m;cin>>n>>m;
	int ans = -1;
	for(int i = 0; n > i; i++){
		int x,y;cin>>x>>y;
		if(m >= y)ans = max(x, ans);
	}
	cout << ans << endl;
}
            
            
            
        