Line 1: ids of remaining polyominoes to place on board for example:
Line 2: space separated h - height and w - width of game board
Following lines: h strings of length w representing game board, where
- must remain unoccupied. - must be occupiedO
Your task is to carefully arrange all the given polyominoes to perfectly fill the predefined shape. Rotate and flip the pieces as needed, but make sure everything fits!
OOO
OOO
O.O
There are two possible solutions:
DAA AAD
DDA or ADD
D.A A.D
So you should print either one of them.
Line 1: ids of remaining polyominoes to place on board for example:
Line 2: space separated h - height and w - width of game board
Following lines: h strings of length w representing game board, where
. - must remain unoccupied
O - must be occupied
. - is unoccupied
A -N - as ID of polyomino that covers given cell