QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 512 MB 總分: 70

#13401. Odašiljači

统计

遗憾的是,这是 Sean 最后一次扮演詹姆斯·邦德(James Bond)了。

他的任务是将散落在广阔沙漠(可表示为一个二维平面)中的 $n$ 个天线连接成网络。他将把每个天线的发射半径设置为相同的非负实数 $r$。天线的覆盖范围定义为到该天线距离不超过 $r$ 的所有点的集合。如果两个天线的覆盖范围有公共点,则这两个天线可以直接通信。此外,如果天线 $A$ 和 $B$ 可以通信,且天线 $B$ 和 $C$ 可以通信,那么天线 $A$ 和 $C$ 也可以通过天线 $B$ 进行通信。

Sean 想要将所有天线联网,即让任意两个天线之间都可以进行通信。由于 M 限制了这次任务的经费,且更大的半径需要更多的资金,Sean 将选择尽可能小的半径 $r$。请帮助他解决这个问题!

输入格式

第一行包含一个整数 $n$ ($1 \le n \le 1000$),表示天线的数量。

接下来的 $n$ 行,每行包含两个整数 $x_i$ 和 $y_i$ ($0 \le x_i, y_i \le 10^9$),表示第 $i$ 个天线的坐标。

输出格式

输出最小的半径。

如果你的答案与标准答案的绝对误差或相对误差不超过 $10^{-6}$,则被视为正确。

子任务

在价值 35 分的测试用例中,满足 $1 \le n \le 100$。

样例

输入 1

2
1 1
2 2

输出 1

0.7071068

输入 2

7
2 3
3 4
4 5
0 1
3 1
4 2
1 5

输出 2

1.4142135

输入 3

4
2020 20
20 2020
2020 2020
20 20

输出 3

1000.0000000

说明

第二个样例的解释:

第二个样例的解释

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.