Company: Accenture_29sep
Difficulty: medium
Valid Puzzle Placement Problem Description Takashi is playing a puzzle game. A round of the game gives him one square board and a collection of puzzle pieces, and he must cover every square of the board with the pieces. The board and the pieces are described like this: The board is a square of side N , divided into N x N cells of size 1 x 1 . A piece is made of one or more tiles of size 1 x 1 . Every two tiles of the same piece are joined through a chain of tiles that share a whole side. Tiles that meet only at a corner are not joined. The rules for placing the pieces are: A piece is placed so that each of its tiles covers exactly one cell of the board. A piece may be rotated by 90, 180 or 270 degrees before it is placed. A piece may not be turned over, so a piece and its mirror image are not interchangeable. Two pieces may never cover the same cell. No piece may stick out beyond the edge of the board. Every one of the M pieces must be placed. The round is a valid puzzle when the piece