結果

問題 No.527 ナップサック容量問題
ユーザー %20%20
提出日時 2018-05-31 20:26:16
言語 Perl
(5.38.2)
結果
AC  
実行時間 1,745 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 5,228 KB
実行使用メモリ 9,744 KB
最終ジャッジ日時 2023-09-12 21:06:19
合計ジャッジ時間 18,647 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,616 KB
testcase_01 AC 4 ms
4,768 KB
testcase_02 AC 3 ms
4,628 KB
testcase_03 AC 4 ms
4,736 KB
testcase_04 AC 2 ms
4,680 KB
testcase_05 AC 281 ms
6,728 KB
testcase_06 AC 1,296 ms
9,548 KB
testcase_07 AC 816 ms
8,132 KB
testcase_08 AC 195 ms
6,224 KB
testcase_09 AC 3 ms
4,660 KB
testcase_10 AC 1,229 ms
9,060 KB
testcase_11 AC 533 ms
7,260 KB
testcase_12 AC 312 ms
6,868 KB
testcase_13 AC 1,418 ms
9,376 KB
testcase_14 AC 210 ms
6,680 KB
testcase_15 AC 485 ms
7,480 KB
testcase_16 AC 4 ms
4,624 KB
testcase_17 AC 282 ms
6,716 KB
testcase_18 AC 384 ms
6,940 KB
testcase_19 AC 7 ms
4,972 KB
testcase_20 AC 176 ms
6,296 KB
testcase_21 AC 1,600 ms
9,428 KB
testcase_22 AC 825 ms
8,536 KB
testcase_23 AC 1,301 ms
8,896 KB
testcase_24 AC 75 ms
5,784 KB
testcase_25 AC 642 ms
7,808 KB
testcase_26 AC 561 ms
7,512 KB
testcase_27 AC 629 ms
7,920 KB
testcase_28 AC 473 ms
7,500 KB
testcase_29 AC 1,745 ms
9,744 KB
testcase_30 AC 3 ms
4,660 KB
testcase_31 AC 5 ms
4,552 KB
testcase_32 AC 6 ms
4,708 KB
testcase_33 AC 5 ms
4,792 KB
testcase_34 AC 7 ms
4,684 KB
testcase_35 AC 496 ms
7,520 KB
testcase_36 AC 5 ms
4,776 KB
testcase_37 AC 291 ms
6,920 KB
testcase_38 AC 379 ms
7,220 KB
testcase_39 AC 362 ms
7,032 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){
	/ /;
	for(reverse 0..@d){
		$d[$_+$']+=$-=$d[$_]+$`-$d[$_+$']
	}
}
for(@d){
	if($_==$V){
		$a||=$i
	}
	if($_>$V){
		$b||=$i-1
	}
	++$i
}
print$a,$/,$b||inf
0