Editorial for IOI '14 Practice Task 3 - Tile
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
This problem can be solved recursively. First, divide the space into four quadrants. The quadrant with the broken grid can be solved recursively. For the three quadrants with the broken grid, we can place a tile in the center just to cover one grid from each quadrant. Then we can recursively solve the three quadrants since all of them have a broken grid at the corner. Please refer to the following figure.
Comments