We are given a partially filled n*n square board. We are also given subgrids of the input board.
Cells in the input board can either be empty or filled (that is, nothing can be placed in them, they are blackened) or can be balloons or iron balls.
- The only thing we can do is place balloons or iron balls in some of or all of the empty cells
- Each subgrid specified in the input should have exactly one balloon and iron ball in the solved board
- Because balloons are buoyant, they should be positioned either in one of the cells located at the top of the board or in a cell directly below a filled cell (i.e., one of the blackened cells in the input) or below other balloons.
- Iron balls, being dense, will sink and should therefore be positioned either directly on one of the cells located at the bottom of the input board, or on a cell directly above a filled cell (i.e., one of the blackened cells in the input), or above another iron ball.