QOJ.ac

QOJ

حد الوقت: 6 s حد الذاكرة: 1024 MB مجموع النقاط: 100

#6445. 罐子里的星星

الإحصائيات

Vera 是一位天文学家,正在研究附近恒星系统的局部区域。这些恒星系统可以被看作空间中的 3D 点。Vera 想在这些恒星周围放置一个罐子。换句话说,她想知道包围这些恒星的最小体积圆柱体是多少。圆柱体可以朝向任何方向。圆柱体的至少一个底面必须包含至少三颗恒星。

输入格式

每个输入包含一个测试用例。请注意,你的程序可能会在不同的输入上运行多次。输入的第一行包含一个整数 $n$ ($4 \le n \le 1,000$),表示恒星的数量。

接下来的 $n$ 行,每行包含三个整数 $x, y, z$ ($-1,000 \le x, y, z \le 1,000$),表示一颗恒星的位置。没有两颗恒星位于同一位置。没有四颗恒星是共面的。

输出格式

输出一个浮点数,表示可以包围所有恒星的最小体积圆柱体。你的答案必须在 $10^{-6}$ 的相对误差范围内准确。

样例

输入 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

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.