Stars in a Can
Time limit2sMemory limit512 MB
Place all n points in 3D inside one cylinder of any orientation, with at least three stars on one base, and print the minimum possible volume.
- Level
Hard8 of 10
- Topics
- Geometry, Brute force, Math, Implementation
- Solved
- No attempts yet
Problem
Vera is an astronomer who studies how nearby stars are distributed. Each star is a point in three dimensional space. Vera wants to put every star inside one cylinder. The cylinder may point in any direction, and at least one of its two circular bases must hold three or more stars.
Find the smallest volume of a cylinder that contains every star.
Input
The first line contains the number of stars ().
Each of the next lines contains three integers , and , the position of one star ().
No two stars share a position, and no four stars lie on one plane.
Output
Print the smallest volume of a cylinder that contains every star, rounded to two digits after the decimal point, on one line. For example, print 1.57 when the volume is .
In every input the answer is at least away from a two decimal rounding boundary.