結果
問題 | No.606 カラフルタイル |
ユーザー |
![]() |
提出日時 | 2017-12-06 00:10:28 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 709 ms / 2,000 ms |
コード長 | 181 bytes |
コンパイル時間 | 712 ms |
コンパイル使用メモリ | 7,072 KB |
実行使用メモリ | 32,768 KB |
最終ジャッジ日時 | 2024-11-28 18:33:02 |
合計ジャッジ時間 | 9,096 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
コンパイルメッセージ
Name "main::h" used only once: possible typo at Main.pl line 5. Name "main::q" used only once: possible typo at Main.pl line 1. Main.pl syntax OK
ソースコード
($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,$/;}