QOJ.ac

QOJ

Límite de tiempo: 10 s Límite de memoria: 2048 MB Puntuación total: 100

#2433. 熊猫保护区

Estadísticas

上个月,四川省获得了建立大熊猫国家公园的资金,这是一个为超过 1800 只大熊猫提供保护的自然保护区。公园将被多边形围栏包围。为了让研究人员追踪大熊猫,将在围栏多边形的每个顶点处放置无线接收器,并为每只动物配备无线发射器。每个无线接收器将覆盖以接收器位置为圆心的圆形区域,且所有接收器的覆盖范围(半径)相同。显然,覆盖范围较小的接收器更便宜,因此你的目标是确定足以覆盖整个公园的最小可能覆盖半径。

作为一个例子,图 G.1 展示了第一个样例输入所描述的公园。请注意,无线覆盖半径为 35 是不够的(图 a),而最优半径 50 可以覆盖整个公园(图 b)。

图 G.1:样例输入 1 的示意图。(a) 不足以覆盖公园的范围。(b) 覆盖公园的最小范围。

输入格式

输入的第一行包含一个整数 $n$ ($3 \le n \le 2\,000$),表示包围公园的多边形的顶点数。接下来 $n$ 行,每行包含两个整数 $x$ 和 $y$ ($|x|, |y| \le 10^4$),按逆时针顺序给出多边形顶点的坐标 $(x, y)$。该多边形是简单多边形;也就是说,其顶点各不相同,且多边形的任意两条边不相交或接触,除了相邻的边在它们的公共顶点处接触。

输出格式

输出足以覆盖公园的最小无线覆盖半径,要求绝对误差或相对误差不超过 $10^{-6}$。

样例

输入 1

5
0 0
170 0
140 30
60 30
0 70

输出 1

50

输入 2

5
0 0
170 0
140 30
60 30
0 100

输出 2

51.538820320

输入 3

5
0 0
1 2
1 5
0 2
0 1

输出 3

1.581138830

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.