結果

問題 No.1 道のショートカット
ユーザー %20%20
提出日時 2017-05-20 19:38:48
言語 Perl
(5.38.2)
結果
AC  
実行時間 2,633 ms / 5,000 ms
コード長 294 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 5,208 KB
実行使用メモリ 6,500 KB
最終ジャッジ日時 2023-09-27 22:06:57
合計ジャッジ時間 18,287 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
5,200 KB
testcase_01 AC 5 ms
5,124 KB
testcase_02 AC 5 ms
5,128 KB
testcase_03 AC 5 ms
5,128 KB
testcase_04 AC 5 ms
5,180 KB
testcase_05 AC 5 ms
5,052 KB
testcase_06 AC 6 ms
5,184 KB
testcase_07 AC 6 ms
5,212 KB
testcase_08 AC 841 ms
6,048 KB
testcase_09 AC 368 ms
5,600 KB
testcase_10 AC 357 ms
5,808 KB
testcase_11 AC 1,266 ms
6,088 KB
testcase_12 AC 2,131 ms
6,476 KB
testcase_13 AC 1,857 ms
6,500 KB
testcase_14 AC 25 ms
5,384 KB
testcase_15 AC 6 ms
5,120 KB
testcase_16 AC 128 ms
5,436 KB
testcase_17 AC 6 ms
5,136 KB
testcase_18 AC 54 ms
5,352 KB
testcase_19 AC 82 ms
5,256 KB
testcase_20 AC 262 ms
5,336 KB
testcase_21 AC 135 ms
5,220 KB
testcase_22 AC 57 ms
5,168 KB
testcase_23 AC 1,669 ms
5,920 KB
testcase_24 AC 1,691 ms
6,032 KB
testcase_25 AC 378 ms
5,500 KB
testcase_26 AC 149 ms
5,368 KB
testcase_27 AC 2,633 ms
6,012 KB
testcase_28 AC 9 ms
5,076 KB
testcase_29 AC 259 ms
6,040 KB
testcase_30 AC 23 ms
5,380 KB
testcase_31 AC 50 ms
5,528 KB
testcase_32 AC 720 ms
5,852 KB
testcase_33 AC 334 ms
5,612 KB
testcase_34 AC 876 ms
5,992 KB
testcase_35 AC 11 ms
5,608 KB
testcase_36 AC 155 ms
5,656 KB
testcase_37 AC 32 ms
5,672 KB
testcase_38 AC 16 ms
5,240 KB
testcase_39 AC 83 ms
5,192 KB
testcase_40 AC 38 ms
5,276 KB
testcase_41 AC 13 ms
5,376 KB
testcase_42 AC 5 ms
5,184 KB
testcase_43 AC 6 ms
5,204 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($N,$C,$V,$S,$T,$Y,$M)=<>;
@$_=(0,glob$$_)for S,T,Y,M;
$d[1][0]=_;
for(1..$N-1){
	for$v(1..$V){
		for$c(0..$C-$Y[$v]){
			if($d[$S[$v]][$c]){
				$_=\$d[$T[$v]][$c+$Y[$v]];
				$$_||=9e9;
				$$_-=$-=$$_-($d[$S[$v]][$c]+$M[$v]);
			}
		}
	}
}
@_=grep$_,@{$d[$N]};
print@_?(sort{$a-$b}@_)[0]:-1
0