length cells long has to be paved. There are two kinds of tiles: a short one covers a single cell and a long one covers two neighbouring cells. You have as many tiles of each kind as you need.
The whole path must be covered with no gaps and no overlaps. Two layouts are different if the sequences of tiles from the start of the path to its end differ: for example, "long, short" and "short, long" are two different layouts.
Return the number of different layouts.length=1 → 1
A strip of length 1 can only be covered by a single short tile.
length=4 → 5
Five layouts: 1+1+1+1, 2+1+1, 1+2+1, 1+1+2 and 2+2.
length=6 → 13
length ≤ 45length=1
1
Run checks the first 3 tests in your browser. Submit checks all 19 tests on the server, hidden ones included.