Air Raid Shelter
Time limit1sMemory limit1024 MB
Given N unit square walls, find the largest area of interior space that the walls can fully enclose.
- Level
Medium6 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
문제
Build the largest possible air raid shelter by placing walls, each a square with side length , parallel to each other's sides and without overlapping. The area of a shelter is the floor area of the interior space fully enclosed by the walls. Find the maximum area of a shelter that can be made from walls.
With walls placed as shown below, you can make a shelter with area . No shelter with a larger area can be made.

입력
The first line contains the number of walls .
출력
Print the maximum area of a shelter that can be made from walls.