#P8784. [蓝桥杯 2022 省 B] 积木画
[蓝桥杯 2022 省 B] 积木画
Problem Description
Xiaoming has recently become interested in block paintings. There are two types of blocks: the block (area of unit squares) and the block (area of unit squares):

At the same time, Xiaoming has a canvas of size . The canvas consists of regions of size . He needs to completely fill the canvas using the two types of blocks above, and he wants to know how many different ways there are in total. The blocks can be rotated freely, and the orientation of the canvas is fixed.
Input Format
Input an integer , representing the canvas size.
Output Format
Output an integer representing the answer. Since the answer may be very large, output the value modulo (i.e. ).
3
5
Hint
Sample Explanation
The five cases are shown in the figure below. The colors are only used to distinguish different blocks.

Constraints
For all testdata, .
Lanqiao Cup 2022 Provincial Contest B Group, Problem G.
Translated by ChatGPT 5