結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,104 KB
testcase_01 AC 7 ms
5,144 KB
testcase_02 AC 7 ms
5,176 KB
testcase_03 AC 6 ms
5,148 KB
testcase_04 WA -
testcase_05 AC 6 ms
5,064 KB
testcase_06 AC 7 ms
5,380 KB
testcase_07 AC 6 ms
5,116 KB
testcase_08 AC 231 ms
5,568 KB
testcase_09 AC 234 ms
5,572 KB
testcase_10 AC 9 ms
5,196 KB
testcase_11 AC 10 ms
5,192 KB
testcase_12 AC 22 ms
5,300 KB
testcase_13 AC 32 ms
5,676 KB
testcase_14 AC 56 ms
5,952 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 63 ms
6,196 KB
testcase_19 WA -
testcase_20 AC 46 ms
6,232 KB
testcase_21 AC 21 ms
5,636 KB
testcase_22 WA -
testcase_23 AC 295 ms
7,604 KB
testcase_24 AC 298 ms
7,688 KB
testcase_25 AC 301 ms
7,452 KB
testcase_26 AC 296 ms
7,460 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][$x]=$F*($x+$y)
	}
}
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