QOJ.ac

QOJ

時間限制: 5.0 s 記憶體限制: 1024 MB 總分: 100

#17991. 麦田怪圈

统计

在经历了一系列不幸的事件、可疑的投资以及灾难性失败的婚姻之后,Camila 决定彻底离开地球。她没有足够的钱来建造火箭,因此她最好的希望就是被外星人绑架。Camila 咨询了一个 AI 聊天机器人,然后她独立得出结论:被外星人绑架的最佳方法是制作一个麦田怪圈。

好消息是,在 Camila 那些糟糕的投资中,有一家非常大的农场,可以表示为二维平面。农场里有 $N$ 个洒水器,每个洒水器都会灌溉其覆盖半径内的所有植物,半径大小取决于其功率。Camila 的计划是在一个完美的圆上播种玉米。由于农场的土壤非常干燥,Camila 的圆的整个圆周必须被某些洒水器灌溉。请注意,Camila 只需要灌溉圆的圆周,而圆内部的区域可以保持干燥。

为了最大化她被绑架的机会,Camila 的圆需要尽可能大。作为她为数不多的朋友之一,她请求你帮助她确定,在给定每个洒水器的位置和半径的情况下,她可以在农场上种植的最大玉米圆环的半径是多少。

输入格式

第一行包含一个整数 $N$ ($1 \le N \le 40$),表示洒水器的数量。

接下来的 $N$ 行中,每行描述一个洒水器,包含三个整数 $X$、$Y$ 和 $R$ ($-1000 \le X, Y \le 1000$ 且 $1 \le R \le 1000$),表示该洒水器的坐标为 $(X, Y)$,并且可以灌溉半径为 $R$(含边界)范围内的所有植物。

没有两个洒水器位于相同的位置。

输出格式

输出单行,包含 Camila 可以建造的麦田怪圈的最大半径。输出的绝对误差或相对误差不能超过 $10^{-6}$。

样例

输入样例 1

4
1 1 1
-1 1 1
-1 -1 1
1 -1 1

输出样例 1

1

说明

Camila 可以选择五个半径为 $1$ 的麦田怪圈。其中四个的圆心位于洒水器处,而剩下的一个圆心位于 $(0, 0)$。

输入样例 2

1
3 1 415

输出样例 2

415

输入样例 3

4
1 0 2
-1 0 2
0 1 2
0 -1 2

输出样例 3

2.57793547457

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.