結果

問題 No.496 ワープクリスタル (給料日前編)
ユーザー %20%20
提出日時 2017-03-25 01:11:41
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 599 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-09-20 07:27:01
合計ジャッジ時間 4,295 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,088 KB
testcase_01 AC 6 ms
5,296 KB
testcase_02 AC 7 ms
5,152 KB
testcase_03 AC 6 ms
5,088 KB
testcase_04 WA -
testcase_05 AC 6 ms
5,324 KB
testcase_06 AC 9 ms
5,488 KB
testcase_07 WA -
testcase_08 AC 284 ms
5,920 KB
testcase_09 AC 256 ms
5,472 KB
testcase_10 AC 9 ms
5,208 KB
testcase_11 AC 10 ms
5,084 KB
testcase_12 AC 23 ms
5,412 KB
testcase_13 AC 33 ms
5,540 KB
testcase_14 AC 56 ms
5,908 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 65 ms
6,268 KB
testcase_19 WA -
testcase_20 AC 48 ms
6,452 KB
testcase_21 AC 22 ms
5,452 KB
testcase_22 WA -
testcase_23 AC 312 ms
7,884 KB
testcase_24 AC 313 ms
7,876 KB
testcase_25 AC 311 ms
7,852 KB
testcase_26 AC 309 ms
7,828 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::N" used only once: possible typo at Main.pl line 2.
Main.pl syntax OK

ソースコード

diff #

sub min{$_[$_[1]<$_[0]]}
($X,$Y,$N,$F)=glob<>;
for$y(0..$Y){
	for$x(0..$X){
		$_[$y+1][$x]=$_[$y][$x+1]=$F*($x+$y+1)
	}
}
for(<>){
	($dx,$dy,$c)=glob;
	for$y(0..$Y){
		for$x(0..$X){
			$_[$y+$dy][$x+$dx]=min($_[$y+$dy][$x+$dx],$_[$y][$x]+$c)
		}
	}
}
print$_[$Y][$X]
0