CF696F....Dary!
NOI/NOI+/CTSC
通过率:0%
时间限制:3.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Barney has finally found the one, a beautiful young lady named Lyanna. The problem is, Lyanna and Barney are trapped in Lord Loss' castle. This castle has shape of a convex polygon of n points. Like most of castles in Demonata worlds, this castle has no ceiling.

Barney and Lyanna have an escape plan, but it requires some geometry knowledge, so they asked for your help.
Barney knows that demons are organized and move in lines. He and Lyanna want to wait for the appropriate time so they need to watch for the demons. Each of them wants to stay in a point inside the castle (possibly on edges or corners), also they may stay in the same position. They both want to pick a real number r and watch all points in the circles with radius r around each of them (these two circles may overlap).

We say that Barney and Lyanna are watching carefully if and only if for every edge of the polygon, at least one of them can see at least one point on the line this edge lies on, thus such point may not be on the edge but it should be on edge's line. Formally, each edge line should have at least one common point with at least one of two circles.
The greater r is, the more energy and focus they need. So they asked you to tell them the minimum value of r such that they can watch carefully.
巴尼终于找到了他的真爱,一位名叫莉安娜的美丽年轻女士。但问题是,莉安娜和巴尼被困在了洛斯勋爵的城堡中。这座城堡呈一个具有 n 个顶点的凸多边形形状。与恶魔界大多数城堡一样,这座城堡没有天花板。

巴尼和莉安娜制定了一个逃亡计划,但该计划需要一定的几何知识,因此他们向你求助。
巴尼知道,恶魔们行动有组织性,且沿直线移动。他和莉安娜希望等待合适的时机,因此需要监视恶魔的动向。他们各自需选择城堡内部(含边界或顶点)的一个点作为驻守位置(两人可位于同一位置)。此外,他们还需共同选定一个实数 r,并分别以各自位置为圆心、r 为半径画圆;二人将监视各自圆内所有点(这两个圆可能重叠)。

我们称巴尼和莉安娜“严密监视”当且仅当:对于多边形的每一条边所在的直线,至少有其中一人能够看到该直线上至少一个点(该点未必落在边上,但必须位于该边所在直线上)。形式化地说,每条边所在的直线必须与两个圆中至少一个存在公共点。
$ r $ 越大,他们所需的能量与专注力就越多。因此,他们请你求出能实现“严密监视”的最小 $ r $ 值。
输入格式
The first line of input contains a single integer n (3 ≤ n ≤ 300) — the number of castle polygon vertices.
The next n lines describe the polygon vertices in counter-clockwise order. i-th of them contains two integers x__i and y__i (|x__i|, |y__i| ≤ 104) — the coordinates of i-th point of the castle. It is guaranteed that given points form a convex polygon, in particular, any three of them do not line on the same line.
输入的第一行包含一个整数 n(3≤n≤300)—— 表示城堡多边形的顶点数量。
接下来的 n 行按逆时针顺序描述多边形的顶点。其中第 i 行包含两个整数 xi 和 yi(∣xi∣,∣yi∣≤104)—— 表示城堡第 i 个顶点的坐标。保证所给点构成一个凸多边形,特别地,其中任意三点不共线。
输出格式
In the first line print the single number r — minimum radius of guys' watching circles.
In the second line print the pair of coordinates of point where Barney should stay.
In the third line print the pair of coordinates of point where Lyanna should stay.
Points should lie inside the polygon.
Coordinates may not be integers. If there are multiple answers print any of them.
Your answer will be considered correct if its absolute or relative error doesn't exceed 10 - 6.
第一行输出一个整数 r —— 众人观看圆的最小半径。
第二行输出巴尼应停留位置的坐标对。
第三行输出莉安娜应停留位置的坐标对。
所有点必须位于多边形内部。
坐标可以不是整数。若存在多个正确答案,输出任意一个即可。
当你的答案的绝对误差或相对误差不超过 10−6 时,将被视为正确。
输入输出样例
输入#1
4 -41 67 -16 20 25 25 -36 85
输出#1
0 -16 20 -36 85
输入#2
7 -7 54 -5 31 -2 17 20 19 32 23 34 27 26 57
输出#2
2.9342248 32.019503 23.0390067 -6.929116 54.006444
说明/提示
In the first example guys can stay in opposite corners of the castle.
在第一个例子中,人们可以待在城堡的对角角落。
输入解题思路,AI测评打分。不知道怎么写?