結果
| 問題 | No.2492 Knapsack Problem? | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-10-06 21:21:34 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 826 bytes | 
| コンパイル時間 | 2,437 ms | 
| コンパイル使用メモリ | 242,640 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-07-26 15:36:34 | 
| 合計ジャッジ時間 | 2,912 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 | 
ソースコード
#include <bits/stdc++.h>
// #include <x86intrin.h>
using namespace std;
using namespace numbers;
int main(){
	cin.tie(0)->sync_with_stdio(0);
	cin.exceptions(ios::badbit | ios::failbit);
	int n, th;
	cin >> n >> th;
	int res = -1;
	for(auto i = 0; i < n; ++ i){
		int x, y;
		cin >> x >> y;
		if(y <= th){
			res = max(res, x);
		}
	}
	cout << res << "\n";
	return 0;
}
/*
*/
////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//                                   Coded by Aeren                                   //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////
            
            
            
        