結果

問題 No.527 ナップサック容量問題
ユーザー %20%20
提出日時 2018-05-31 19:43:58
言語 Perl
(5.38.2)
結果
AC  
実行時間 802 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 737 ms
コンパイル使用メモリ 5,316 KB
実行使用メモリ 9,664 KB
最終ジャッジ日時 2023-09-12 21:03:34
合計ジャッジ時間 10,654 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,652 KB
testcase_01 AC 3 ms
4,592 KB
testcase_02 AC 3 ms
4,600 KB
testcase_03 AC 4 ms
4,656 KB
testcase_04 AC 3 ms
4,544 KB
testcase_05 AC 135 ms
6,684 KB
testcase_06 AC 595 ms
9,260 KB
testcase_07 AC 381 ms
8,180 KB
testcase_08 AC 94 ms
6,208 KB
testcase_09 AC 3 ms
4,656 KB
testcase_10 AC 572 ms
9,108 KB
testcase_11 AC 247 ms
7,232 KB
testcase_12 AC 148 ms
6,672 KB
testcase_13 AC 659 ms
9,504 KB
testcase_14 AC 103 ms
6,608 KB
testcase_15 AC 231 ms
7,428 KB
testcase_16 AC 3 ms
4,732 KB
testcase_17 AC 135 ms
6,688 KB
testcase_18 AC 182 ms
7,020 KB
testcase_19 AC 6 ms
4,880 KB
testcase_20 AC 85 ms
6,344 KB
testcase_21 AC 743 ms
9,476 KB
testcase_22 AC 393 ms
8,528 KB
testcase_23 AC 605 ms
8,936 KB
testcase_24 AC 38 ms
5,844 KB
testcase_25 AC 309 ms
7,880 KB
testcase_26 AC 265 ms
7,464 KB
testcase_27 AC 300 ms
7,796 KB
testcase_28 AC 225 ms
7,548 KB
testcase_29 AC 802 ms
9,664 KB
testcase_30 AC 3 ms
4,552 KB
testcase_31 AC 4 ms
4,528 KB
testcase_32 AC 4 ms
4,608 KB
testcase_33 AC 4 ms
4,636 KB
testcase_34 AC 4 ms
4,668 KB
testcase_35 AC 243 ms
7,484 KB
testcase_36 AC 4 ms
4,656 KB
testcase_37 AC 143 ms
6,912 KB
testcase_38 AC 181 ms
7,200 KB
testcase_39 AC 176 ms
6,932 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "inf" may clash with future reserved word at Main.pl line 19.
Main.pl syntax OK

ソースコード

diff #

<>;
@vw=<>;
$V=pop@vw;
for(@vw){
	($v,$w)=split;
	for(reverse 0..@d){
		$d[$_+$w]+=$-=$d[$_]+$v-$d[$_+$w]
	}
}
for(@d){
	if($_==$V){
		$a||=$i
	}
	if($_>$V){
		$b||=$i-1
	}
	++$i
}
print$a,$/,$b||inf
0