結果
問題 | No.621 3 x N グリッド上のドミノの置き方の数 |
ユーザー |
![]() |
提出日時 | 2017-12-25 01:31:41 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 496 ms / 3,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 198 ms |
コンパイル使用メモリ | 6,820 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-17 18:45:23 |
合計ジャッジ時間 | 26,410 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 66 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
sub mul{my@C;for$y(0..27){for$x(0..27){for(0..27){($C[$y][$x]+=$Z[$y][$_]*$_[$_][$x])%=1e9+7}}}@C}@_=(4,5,6,8,9,10,15,17,18,20,21,22,24,25,26,31,33,34,36,37,38,40,41,42,47,60,61,62);for$y(0..27){@y=map$_[$y]>>2*$_&3,0..2;for$x(0..27){@x=map$_[$x]>>2*$_&3,0..2;$@[$y][$x]+=!grep"$x[$_]$y[$_]"=~/00|1[013]|[023]2/,0..2}}$Z[$_][$_]=1for 0..27;$N=<>;(@Z=mul@Z),$N+1>>$=&1and@Z=mul@@while$=--;print$Z[10][23]