結果

問題 No.496 ワープクリスタル (給料日前編)
ユーザー tailstails
提出日時 2017-03-24 22:35:05
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 274 bytes
コンパイル時間 708 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 6,932 KB
最終ジャッジ日時 2023-09-20 07:13:34
合計ジャッジ時間 24,212 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,184 KB
testcase_01 AC 7 ms
5,316 KB
testcase_02 AC 7 ms
5,184 KB
testcase_03 AC 7 ms
5,204 KB
testcase_04 WA -
testcase_05 AC 7 ms
5,320 KB
testcase_06 AC 124 ms
6,708 KB
testcase_07 AC 6 ms
5,136 KB
testcase_08 TLE -
testcase_09 TLE -
testcase_10 AC 33 ms
5,240 KB
testcase_11 AC 34 ms
5,140 KB
testcase_12 AC 147 ms
5,344 KB
testcase_13 AC 239 ms
5,428 KB
testcase_14 AC 467 ms
5,900 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 551 ms
6,028 KB
testcase_19 WA -
testcase_20 AC 373 ms
5,868 KB
testcase_21 AC 139 ms
5,256 KB
testcase_22 TLE -
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($gx,$gy,$n,$f)=glob<>;
@a=(<>,"0 1 $f","1 0 $f");
for$y(0..$gy){
	for$x(0..$gx){
		$d{$y,$x}=$x+$y&&1e9;
		for(@a){
			($xi,$yi,$ci)=glob;
			$xs=$x-$xi;
			$ys=$y-$yi;
			$d{$y,$x}=$d{$ys,$xs}+$ci if $ys>=0 && $xs>=0 && $d{$y,$x}>$d{$ys,$xs}+$ci;
		}
	}
}
print$d{$gy,$gx}
0