結果
| 問題 |
No.541 3 x N グリッド上のサイクルの個数
|
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2017-09-01 21:53:29 |
| 言語 | Perl (5.40.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 429 bytes |
| コンパイル時間 | 128 ms |
| コンパイル使用メモリ | 5,248 KB |
| 実行使用メモリ | 5,504 KB |
| 最終ジャッジ日時 | 2024-11-06 17:30:28 |
| 合計ジャッジ時間 | 3,335 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
$N=<>;
(@Z=mul@Z),$N+1>>$=&1and@Z=mul@@while$=--;
print$Z[9]
%20