There is a store room which has only three sides all touching each other perpendicularly, the sides can be defined as: two infinitely large walls and one infinitely large floor.
There are $N$ cubes of unit volume. I need to store the cubes in the store room but there are two rules to be followed before storing:
- A cube can be placed anywhere on the floor.
- If a cube A is placed upon another cube B, then there should be a cube on all the four sides of the cube B unless the side is already blocked by a wall.
I need to output the minimum floor area covered for storing N cubes.
Example
$N = 3$ requires 3 unit square of floor area as all the cubes need to be placed on the floor.
$N = 4$ requires 3 unit square of floor area. Let there be cubes A, B, C, D; cube A can be placed above the cube B, which is touching both the walls. Since cube B is touching both the walls it is blocked on 2 sides but open on 2 other sides, cubes C and D can be placed on the adjacent open sides of Cube B. Hence, Cube A can be placed on the cube B following the given rules.
I am trying to think it by intution but not coming up to a reasonable answer which could prove that my answer is correct.
