CF744D.Hongcow Draws a Circle
NOI/NOI+/CTSC
通过率:0%
时间限制:6.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Hongcow really likes the color red. Hongcow doesn't like the color blue.
Hongcow is standing in an infinite field where there are n red points and m blue points.
Hongcow wants to draw a circle in the field such that this circle contains at least one red point, and no blue points. Points that line exactly on the boundary of the circle can be counted as either inside or outside.
Compute the radius of the largest circle that satisfies this condition. If this circle can have arbitrarily large size, print - 1. Otherwise, your answer will be accepted if it has relative or absolute error at most 10 - 4.
红牛(Hongcow)非常喜欢红色,不喜欢蓝色。
红牛站在一个无限大的平面上,平面上有 n 个红点和 m 个蓝点。
红牛想在这个平面上画一个圆,使得该圆至少包含一个红点,且不包含任何蓝点。恰好落在圆边界上的点,可被视作在圆内或圆外(即边界点的归属可自由选择)。
请计算满足上述条件的最大可能圆的半径。若这样的圆可以任意大,请输出 -1;否则,你的答案只要满足相对误差或绝对误差不超过 10−4 即可被接受。
输入格式
The first line of the input will contain two integers n, m (1 ≤ n, m ≤ 1, 000).
The next n lines will contain two integers x__i, y__i (1 ≤ x__i, y__i ≤ 104). This denotes the coordinates of a red point.
The next m lines will contain two integers x__i, y__i (1 ≤ x__i, y__i ≤ 104). This denotes the coordinates of a blue point.
No two points will have the same coordinates.
输入的第一行包含两个整数 n 和 m(1≤n,m≤1,000)。
接下来的 n 行,每行包含两个整数 xi、yi(1≤xi,yi≤104),表示一个红点的坐标。
再接下来的 m 行,每行包含两个整数 xi、yi(1≤xi,yi≤104),表示一个蓝点的坐标。
任意两个点的坐标均不相同。
输出格式
Print - 1 if the circle can have arbitrary size. Otherwise, print a floating point number representing the largest radius circle that satisfies the conditions. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 4.
Namely, let's assume that your answer is a and the answer of the jury is b. The checker program will consider your answer correct if
.
如果圆的半径可以为任意大小,则输出 −1;否则,输出一个浮点数,表示满足条件的最大半径。当你的答案的绝对误差或相对误差不超过 10−4 时,即视为正确。
也就是说,假设你的答案为 a,评测组的答案为 b,则当满足
时,评测程序将判定你的答案正确。
输入输出样例
输入#1
2 5 2 3 3 4 1 1 1 4 4 2 4 7 2 5
输出#1
3.5355338827
输入#2
1 6 3 3 1 5 5 4 2 1 3 4 4 2 1 3
输出#2
1.5811388195
输入#3
2 2 2 2 3 3 1 1 4 4
输出#3
-1
说明/提示
This is a picture of the first sample

This is a picture of the second sample

这是第一个样例的图片

这是第二个样例的图片

输入解题思路,AI测评打分。不知道怎么写?