結果

問題 No.572 妖精の演奏
ユーザー tailstails
提出日時 2017-10-07 01:47:12
言語 Perl
(5.38.2)
結果
AC  
実行時間 900 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 29 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 8,064 KB
最終ジャッジ日時 2024-04-28 11:56:06
合計ジャッジ時間 4,043 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
6,144 KB
testcase_01 AC 12 ms
6,016 KB
testcase_02 AC 7 ms
6,016 KB
testcase_03 AC 7 ms
6,016 KB
testcase_04 AC 11 ms
6,016 KB
testcase_05 AC 39 ms
6,016 KB
testcase_06 AC 60 ms
6,272 KB
testcase_07 AC 24 ms
6,144 KB
testcase_08 AC 29 ms
6,144 KB
testcase_09 AC 38 ms
6,016 KB
testcase_10 AC 261 ms
6,656 KB
testcase_11 AC 597 ms
7,296 KB
testcase_12 AC 709 ms
7,424 KB
testcase_13 AC 900 ms
8,064 KB
testcase_14 AC 138 ms
6,272 KB
testcase_15 AC 174 ms
6,400 KB
testcase_16 AC 113 ms
6,272 KB
testcase_17 AC 191 ms
6,528 KB
testcase_18 AC 25 ms
6,144 KB
testcase_19 AC 6 ms
5,888 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible precedence problem on bitwise | operator at Main.pl line 7.
Name "main::u" used only once: possible typo at Main.pl line 7.
Main.pl syntax OK

ソースコード

diff #

$n=<>-1;
@m=0..<>-1;
@1=map[glob],<>;

sub f{
	my($a,$b,$c)=@_;
	$a<2|$u{$a}++&&return;
	f($b=$a>>1);
	f($c=$a-$b);
	for$y(@m){
		for$x(@m){
			for$z(@m){
				$$a[$x][$y]+=$-=$$b[$x][$z]+$$c[$z][$y]-$$a[$x][$y];
			}
		}
	}
}

f($n);
for$y(@m){
	for$x(@m){
		$%+=$-=$$n[$x][$y]-$%;
	}
}
print$%
0