QOJ.ac

QOJ

Limite de temps : 3.0 s Limite de mémoire : 1024 MB Points totaux : 100 Hackable ✓

#8974. 喵之国

Statistiques

在 24 世纪,宇宙中存在一个名为“喵国”(Country Meow)的国家。得益于先进的技术,人们可以轻松地在三维空间中穿梭。

喵国有 $N$ 座城市。第 $i$ 座城市位于笛卡尔坐标系中的 $(x_i, y_i, z_i)$。

由于来自“汪国”(Country Woof)的威胁日益增加,总统决定建立一个新的作战指挥部,以便不同城市的部队能够轻松通信。因此,作战指挥部到任意城市之间的欧几里得距离之最大值应当被最小化。

你的任务是计算作战指挥部到最远城市之间的最小欧几里得距离。

输入格式

第一行包含一个整数 $N$ ($1 \le N \le 100$)。

接下来的 $N$ 行描述了第 $i$ 座城市的位置。每行包含三个整数 $x_i, y_i, z_i$ ($-100000 \le x_i, y_i, z_i \le 100000$)。

输出格式

输出一个实数——作战指挥部到最远城市之间的最小欧几里得距离。如果你的答案的绝对误差或相对误差不超过 $10^{-3}$,则被视为正确。形式化地,设你的答案为 $a$,标准答案为 $b$,若满足 $\frac{|a-b|}{\max(1, |b|)} \le 10^{-3}$,则你的答案被视为正确。

样例

样例输入 1

3
0 0 0
3 0 0
0 4 0

样例输出 1

2.5000195345

样例输入 2

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

样例输出 2

0.8164984201

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.