Fatal Error · Extreme CodeFree
Patches Across the Seams
A quilting machine repeats one stencil along a very, very long roll. Every bit of fabric gets covered by a two-square patch, and patches may cross the seams. In how many ways can the roll be covered?
Count the different ways to cover the roll, modulo 1 000 000 007.
The number must be exactly right, modulo 1 000 000 007.
h p r. Next h lines: the stencil, p characters each: . fabric, # a hole.h ≤ 5, 1 ≤ p ≤ 20, 1 ≤ r ≤ 10¹²3 3 3 ... .#. ...
18
Sign in to play. It is free.
Sign in