問題一覧 > 通常問題

No.1754 T-block Tiling

レベル : / AI推定難易度 : 1600 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 141
作問者 : NyaanNyaan / テスター : tokusakurai PCTprobability
お気に入りにしたユーザー ProblemId : 7116 / 自分の提出
問題文最終更新日: 2021-11-20 02:19:35
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 324 (順位表) の他の問題:

Problem Statement

You are given a grid with $4$ rows and $4N$ columns, and $4N$ T-shaped tetrominoes.

Nyaan decides to fill all the cells of the grid with tetrominoes so that the following conditions are satisfied.

  • Each cell of the grid is covered by exactly $1$ tetromino.
  • Tetrominoes may be rotated when placed.

Find the number of placements of tetrominoes satisfying the conditions, modulo $998244353$.

Here, arrangements that coincide by flipping or rotating the grid are considered different. Also, the tetrominoes are indistinguishable from each other.

You are given $T$ test cases; find the answer for each of them.

Constraints

  • All input values are integers.
  • $1 \leq T \leq 100$
  • $1 \leq N \leq 100$

Input

The input is given in the following format.
$T$
$\mathrm{case}1$
$\vdots$
$\mathrm{case}T$
Each case is given in the following format.
$N$

Output

Print $T$ lines, followed by a newline at the end.
On the $i$-th line, print the answer to the $i$-th test case.

Sample

Sample 1
Input
3
1
2
100
Output
2
6
52834137

For $N = 1$, the following $2$ placements of tetrominoes are possible.
Numbers are written in the grid for visibility, but note that the tetrominoes are not distinguished from each other when counting.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。