#P5303. [GXOI/GZOI2019] 逼死强迫症

[GXOI/GZOI2019] 逼死强迫症

Description

ITX351 wants to pave a 2×N2 \times N road, so he bought NN 2×12 \times 1 bricks. However, one brick cracked in the middle during transportation and became two 1×11 \times 1 blocks.
This gave ITX351 an evil idea: he wants to deliberately place the two 1×11 \times 1 blocks separately on the road, making sure the two blocks do not share any adjacent edge. The other bricks can be placed in any way, until the whole road is fully covered. This will surely drive his own OCD (sea5) crazy!

Maybe you have already guessed what happens next—he got so excited that he could not type anymore. So he asks you to help compute how many different ways there are to make his plot succeed.

Input Format

Each test point contains multiple test cases. The first line of the input file is a positive integer TT, which denotes the number of test cases. Note that different test cases are independent.

The next TT lines each contain a positive integer NN, representing the length of the road in that test case.

Output Format

The output should contain TT lines. For each test case, output a positive integer, representing the number of valid tilings that satisfy the condition.

Since the answer may be very large, you only need to output the result modulo 1000000007(109+7)1000000007 (10^9 + 7).

3
1
2
4
0
0
6

Hint

For the sample, the explanation for N=4N = 4 is shown in the figure below:

Constraints

Test point ID Scale of NN Scale of TT
11 N10N \le 10 T10T \le 10
22
33 N105N \le 10^5 T50T \le 50
44
55
66 N2×109N \le 2 \times 10^9
77
88
99 T500T \le 500
1010

Translated by ChatGPT 5