Covering a board

You have an n × m board. In how many ways can you cover it with 1 × 2
pieces?

Input

Input consists of n and m. You can assume 2 ≤ nm ≤ 52, and that nm is
even.

Output

Print in lexicographical order all the ways to cover the board. To
distinguish the pieces, both cells must have the same lowercase letter,
and all the pieces must have different letters. Appart from that,
letters should be as small possible. Print an empty line after each
solution.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T10:32:23.084Z

© Jutge.org, 2006–2026.
https://jutge.org
