結果

問題 No.459 C-VS for yukicoder
ユーザー tails
提出日時 2016-12-10 02:46:49
言語 Perl
(5.40.0)
結果
AC  
実行時間 274 ms / 2,000 ms
コード長 339 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 6,948 KB
実行使用メモリ 21,320 KB
最終ジャッジ日時 2024-11-28 21:17:37
合計ジャッジ時間 4,922 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 58
権限があれば一括ダウンロードができます
コンパイルメッセージ
Useless use of non-destructive substitution (s///r) in void context at Main.pl line 2.
Name "main::w" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($h,$w,$n)=glob<>;
<>=~s/#/++$a["@-"]/ger for 1..$h;
for$t(0..$n-1){
	$b[$t]=sprintf"%6d $t",$b=<>;
	$e[$b+$_]+=3for 0..2;
}
for(sort@b){
	($b,$t,$s)=split;
	$a[$b+$_]-=$r[$t][$_]=$-=$a[$b+$_]-($e[$b+$_]-=3),$s|=$-for 0..2;
	$s|!$a[$b+$_]or$a[$b+$_]-=$s=++$r[$t][$_]for 0..2;
}
for$r(@r){
	print map($$r[$_]-->0?'#':'.',0..2),$/for 0..2;
}
0