logo AlgoBeat OnlineJudge
登录 注册

#216203. [ICPC 2017 NAIPC] Stars in a Can

内存限制:512 MiB 时间限制:6000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Vera is an astronomer studying locality of nearby star systems. The star systems can be thought of as 3D points in space. Vera would like to place a can around the stars. In other words, she would like to know what is the smallest volume cylinder that encloses the stars. The cylinder can be oriented in any direction. At least one base of the cylinder must have at least three stars.

输入格式

Each input will consist of a single test case. Note that your program may be run multiple times on different inputs. The first line of input will contain a single integer (), representing the number of stars.

Each of the next lines will contain three integers , and (), representing the position of a single star. No two stars will be at the same position. No four stars will be coplanar.

输出格式

Output a floating point number representing the smallest volume cylinder that can enclose all the stars. Your answer must be accurate within a relative tolerance of .

样例

样例输入 1

4
1 0 0
1 1 0
0 0 0
0 0 1

样例输出 1

1.57079633

样例输入 2

4
-100 0 0
10 0 10
-10 -10 -10
0 0 0

样例输出 2

41938.65135885

样例输入 3

7
10 20 30
0 0 0
-100 1000 -20
100 -20 33
8 -7 900
-100 -223 -23
3 0 3

样例输出 3

298192571.11934924