結果

問題 No.496 ワープクリスタル (給料日前編)
ユーザー tailstails
提出日時 2017-03-24 22:40:37
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 283 bytes
コンパイル時間 487 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 6,836 KB
最終ジャッジ日時 2023-09-20 01:43:36
合計ジャッジ時間 4,475 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
5,220 KB
testcase_01 AC 6 ms
5,176 KB
testcase_02 AC 6 ms
5,332 KB
testcase_03 AC 5 ms
5,372 KB
testcase_04 WA -
testcase_05 AC 6 ms
5,176 KB
testcase_06 AC 32 ms
6,672 KB
testcase_07 AC 6 ms
5,372 KB
testcase_08 AC 423 ms
6,832 KB
testcase_09 AC 412 ms
6,832 KB
testcase_10 AC 9 ms
5,400 KB
testcase_11 AC 9 ms
5,304 KB
testcase_12 AC 21 ms
5,236 KB
testcase_13 AC 33 ms
5,344 KB
testcase_14 AC 63 ms
5,724 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 68 ms
6,052 KB
testcase_19 WA -
testcase_20 AC 53 ms
5,984 KB
testcase_21 AC 21 ms
5,292 KB
testcase_22 WA -
testcase_23 AC 301 ms
6,824 KB
testcase_24 AC 293 ms
6,632 KB
testcase_25 AC 286 ms
6,836 KB
testcase_26 AC 295 ms
6,808 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($gx,$gy,$n,$f)=glob<>;
@a=map[glob],<>,"0 1 $f","1 0 $f";
for$y(0..$gy){
	for$x(0..$gx){
		$d{$y,$x}=$x+$y?1e9:0;
		for(@a){
			($xi,$yi,$ci)=@$_;
			$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