Company: Accenture Japan
Difficulty: medium
Valid Puzzle Problem Description Takashi is playing a puzzle game. The puzzle involves placing multiple puzzle pieces on a square board and filling in all of the gaps of the board. The board and the pieces are characterized as follows: The board is a square of size N × N , divided into squares of size 1 × 1 . The pieces consist of one or more tiles of size 1 × 1 , with the tiles in a piece being connected by sharing an entire side. The rules of the game are as follows: Pieces can only be placed so that each tile exactly overlaps a square on the board. Pieces can be rotated, but not turned over. Multiple pieces must not overlap on one square of the board. A piece must not extend beyond the edge of the board. All pieces must be used. If a board cannot contain all of the pieces or contains any gaps after all of the pieces are placed, the puzzle is not considered a valid puzzle. In the example above (referring to an image showing piece shapes), the left side of the puzzle