You have an board. In how many mays can you cover it with pieces?
Input consists of and . Assume , and that is even.
Print in lexicographical order all the ways to cover the board. To distinguish the pieces, the two cells of the same piece must have the same digit, and two adjacent pieces must have different digits. Apart from that, digits should be as small as possible. (See the sample output 3.) Print a blank line after every solution.
Author: Salvador Roura
Generation: 2026-01-25T10:17:20.713Z
© Jutge.org, 2006–2026.
https://jutge.org