結果

問題 No.60 魔法少女
ユーザー tailstails
提出日時 2017-02-23 09:35:29
言語 Perl
(5.38.2)
結果
MLE  
実行時間 -
コード長 666 bytes
コンパイル時間 917 ms
コンパイル使用メモリ 5,396 KB
実行使用メモリ 548,644 KB
最終ジャッジ日時 2023-08-30 21:15:22
合計ジャッジ時間 14,141 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::k" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($n,$k)=glob<>;
$e[$_]=<>for 0..$n-1;

for(<>){
($x,$y,$w,$h,$d)=split;
$m{$x,$y}+=$d;
$m{$x+$w+1,$y}-=$d;
$m{$x,$y+$h+1}-=$d;
$m{$x+$w+1,$y+$h+1}+=$d;
}

for$y(@i=-500..1501){
for$x(@i){
$l{$x,$y}+=$l{$x,$y-1}+($r=$m{$x,$y}+=$r);
}
}

for(@e){
($x,$y,$h)=split;
$r+=$-=$h-$l{$x,$y};
}

print$r;

########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
0