You have identical 3-3 domino pieces, and you must cover with them a rectangle. As you can see in the picture below, the positions of the rectangle must be left empty. Depending on , how many different rectangles are possible?
For instance, these are the two only possible rectangles for , two of the six possible rectangles for , and a possible rectangle for :
Input consists of several cases, each with two integer numbers and . You can assume and .
For every case, print the number of rectangles modulo .
Author: Salvador Roura
Generation: 2026-01-25T12:11:09.468Z
© Jutge.org, 2006–2026.
https://jutge.org