結果

問題 No.2492 Knapsack Problem?
ユーザー トミートミー
提出日時 2023-12-15 00:41:01
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 201 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 28,160 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-27 05:52:09
合計ジャッジ時間 980 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 8 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int main(void){
	int N,W,sn,sw,max=0;
	scanf("%d%d",&N,&W);
	for(int i=0;i<N;i++){
		scanf("%d%d",&sn,&sw);
		if (sw<=W){
			if (max<sn){
				max=sn;
			}
		}
	}
	printf("%d",max);
}
0