結果

問題 No.60 魔法少女
ユーザー %20%20
提出日時 2017-03-01 13:19:02
言語 Perl
(5.38.2)
結果
AC  
実行時間 1,144 ms / 5,000 ms
コード長 405 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 5,352 KB
実行使用メモリ 73,780 KB
最終ジャッジ日時 2023-09-02 22:54:09
合計ジャッジ時間 11,570 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 356 ms
38,572 KB
testcase_01 AC 357 ms
38,500 KB
testcase_02 AC 356 ms
38,548 KB
testcase_03 AC 357 ms
38,472 KB
testcase_04 AC 814 ms
57,164 KB
testcase_05 AC 779 ms
66,896 KB
testcase_06 AC 1,144 ms
72,908 KB
testcase_07 AC 905 ms
65,912 KB
testcase_08 AC 696 ms
60,572 KB
testcase_09 AC 508 ms
51,572 KB
testcase_10 AC 1,044 ms
72,092 KB
testcase_11 AC 419 ms
43,904 KB
testcase_12 AC 662 ms
60,708 KB
testcase_13 AC 1,140 ms
73,780 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::K" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($N,$K)=glob<>;
for(0..$N-1){
	<>=~/ .* /;
	$X[$_]=500+$`;
	$Y[$_]=500+$&;
	$D[$_]=$'
}
for(<>){
	/ .* (.*) (.*) /;
	$_[500+$`][500+$&]+=$';
	$_[501+$`+$1][500+$&]-=$';
	$_[500+$`][501+$&+$2]-=$';
	$_[501+$`+$1][501+$&+$2]+=$'
}
for$y(0..1000){for$x(1..1000){
	$_[$x][$y]+=$_[$x-1][$y]
}}
for$x(0..1000){for$y(1..1000){
	$_[$x][$y]+=$_[$x][$y-1]
}}
for(0..$N-1){
	$\+=$-=$D[$_]-$_[$X[$_]][$Y[$_]]
}
print
0