Regular hexagon and triangles
Time limit2sMemory limit512 MB
Choose three non-crossing diagonals of a regular hexagon to maximize the smallest of the four resulting triangles' areas, for side length L.
- Level
Easy3 of 10
- Topics
- Geometry, Greedy, Brute force
- Solved
- No attempts yet
Problem
You have a regular hexagon whose side length is . Drawing three diagonals that do not cross each other splits the hexagon into 4 triangles.
Let be the area of the smallest of those 4 triangles. The value of depends on which diagonals you draw. Write a program that finds the largest possible value of .
Input
The first line contains the side length of the regular hexagon. (, is an integer)
Output
Print the largest possible value of on the first line, rounded half up to exactly six digits after the decimal point. Always print all six digits, including a final 0. The answer is always irrational, so the rounded value is uniquely determined.