結果
問題 |
No.541 3 x N グリッド上のサイクルの個数
|
ユーザー |
![]() |
提出日時 | 2017-09-01 21:50:23 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 455 ms |
コンパイル使用メモリ | 7,076 KB |
実行使用メモリ | 5,504 KB |
最終ジャッジ日時 | 2024-11-06 17:30:24 |
合計ジャッジ時間 | 3,203 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 62 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
sub mul{ my@C; for$y(0..9){ for$x(0..9){ ($C[$y*10+$x]+=$Z[$y*10+$_]*$_[$_*10+$x])%=1e9+7for 0..9 } } @C } @@=( 1,1,1,1,1,1,1,1,0,0, 0,1,1,1,0,0,0,1,0,1, 0,1,1,1,1,1,0,0,0,1, 0,1,1,1,1,1,1,0,1,1, 0,0,1,1,1,1,0,0,0,1, 0,0,1,1,1,1,1,0,0,1, 0,0,0,1,0,1,1,1,0,1, 0,0,0,1,0,0,0,1,0,0, 0,1,0,0,0,0,1,0,1,1, 0,0,0,0,0,0,0,0,0,1 ); $Z[11*$_]=1for 0..9; $.+=<>; (@Z=mul@Z),$.>>$=&1and@Z=mul@@while$=--; print$Z[9]