結果

問題 No.606 カラフルタイル
ユーザー tailstails
提出日時 2017-12-06 00:10:28
言語 Perl
(5.38.2)
結果
AC  
実行時間 722 ms / 2,000 ms
コード長 181 bytes
コンパイル時間 592 ms
コンパイル使用メモリ 5,760 KB
実行使用メモリ 32,640 KB
最終ジャッジ日時 2024-05-06 12:08:08
合計ジャッジ時間 9,343 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,888 KB
testcase_01 AC 7 ms
5,888 KB
testcase_02 AC 7 ms
5,888 KB
testcase_03 AC 6 ms
5,888 KB
testcase_04 AC 6 ms
5,888 KB
testcase_05 AC 7 ms
5,888 KB
testcase_06 AC 7 ms
5,888 KB
testcase_07 AC 7 ms
5,888 KB
testcase_08 AC 6 ms
5,888 KB
testcase_09 AC 6 ms
5,760 KB
testcase_10 AC 6 ms
5,888 KB
testcase_11 AC 7 ms
5,888 KB
testcase_12 AC 7 ms
5,760 KB
testcase_13 AC 52 ms
7,424 KB
testcase_14 AC 7 ms
5,888 KB
testcase_15 AC 12 ms
6,016 KB
testcase_16 AC 497 ms
20,608 KB
testcase_17 AC 722 ms
32,640 KB
testcase_18 AC 579 ms
29,568 KB
testcase_19 AC 596 ms
26,624 KB
testcase_20 AC 649 ms
28,544 KB
testcase_21 AC 601 ms
26,368 KB
testcase_22 AC 599 ms
26,496 KB
testcase_23 AC 630 ms
25,984 KB
testcase_24 AC 656 ms
27,264 KB
testcase_25 AC 497 ms
20,864 KB
testcase_26 AC 662 ms
32,512 KB
testcase_27 AC 649 ms
32,512 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::q" used only once: possible typo at Main.pl line 1.
Name "main::h" used only once: possible typo at Main.pl line 5.
Main.pl syntax OK

ソースコード

diff #

($n,$k,$q)=glob<>;
$n{R}=$n{C}=$n;
for(reverse<>){
	($a,$b,$c)=glob<>;
	if(!$h{$a,$b}++){
		$o[$c]+=$n{R^C^$a};
		--$n{$a};
	}
}
$o[1]+=$n{R}*$n{C};
for(1..$k){
	print$o[$_]+0,$/;
}
0