CF1936F.Grand Finale: Circles
NOI/NOI+/CTSC
通过率:0%
时间限制:2.00s
内存限制:512MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You are given n circles on the plane. The i-th of these circles is given by a tuple of integers (xi,yi,ri), where (xi,yi) are the coordinates of its center, and ri is the radius of the circle.
Please find a circle C which meets the following conditions:
- C is contained inside all n circles given in the input.
- Among all circles C that meet the first condition, the radius of the circle is maximum.
Let the largest suitable circle have the radius of a.
Your output C, described as (x,y,r), will be accepted if it meets the following conditions:
- For each i, (xi−x)2+(yi−y)2+r≤ri+max(a,1)⋅10−7.
- The absolute or relative error of r does not exceed 10−7. Formally, your answer is accepted if and only if max(1,a)∣r−a∣≤10−7.
平面上给出 n 个圆。其中第 i 个圆由整数三元组 (xi,yi,ri) 给出,(xi,yi) 表示其圆心坐标,ri 表示其半径。
请找出一个圆 C,使其满足以下条件:
- C 完全包含于输入给出的全部 n 个圆内;
- 在所有满足第一条条件的圆中,C 的半径最大。
设满足条件的最大圆的半径为 a。
你输出的圆 C(以三元组 (x,y,r) 描述)若满足以下条件,则视为正确:
- 对每个 i,有 (xi−x)2+(yi−y)2+r≤ri+max(a,1)⋅10−7;
- r 的绝对误差或相对误差不超过 10−7。形式化地,当且仅当 max(1,a)∣r−a∣≤10−7 时,你的答案被接受。
输入格式
The first line contains a single integer n (1≤n≤105) — the number of circles.
The i-th of the following n lines contains three integers xi, yi, ri (−106≤xi,yi≤106, 1≤ri≤2⋅106).
It is guaranteed that there is a circle with a radius of at least 10−6 which is contained inside all n circles.
第一行包含一个整数 n(1≤n≤105)—— 圆的个数。
接下来的 n 行中,第 i 行包含三个整数 xi、yi、ri(−106≤xi,yi≤106,1≤ri≤2⋅106)。
保证存在一个半径至少为 10−6 的圆,它被包含在全部 n 个圆的内部。
输出格式
Output three real values, x, y, and r — the coordinates of the center and the radius of the circle.
输出三个实数值 x、y 和 r —— 分别为圆心的坐标和圆的半径。
输入输出样例
输入#1
4 1 1 3 -1 1 3 1 -1 2 -1 -1 2
输出#1
0.0000000000000000 -0.7637626158259733 0.9724747683480533
输入#2
4 41580 -23621 95642 -41580 -23621 95642 0 47821 95642 0 0 109750
输出#2
0.0000000000000000 0.0000000000000000 47821.0000000000000000
说明/提示
A two-dimensional plot depicting the first test case is given below. The output circle C is dashed with blue lines.

A two-dimensional plot depicting the second test case is given below. The output circle C is dashed with blue lines.

下面给出了第一个测试用例的二维示意图。输出圆 C 以蓝色虚线绘制。

下面给出了第二个测试用例的二维示意图。输出圆 C 以蓝色虚线绘制。

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