题目描述
Problem Description
E869120 is trying to create an emblem on a 2D plane using $N + M$ circles numbered $1, 2, 3, \cdots, N + M$ to commemorate the holding of square869120Contest #5.
The circles numbered $1, 2, 3, \cdots, N$ have fixed center coordinates $(x_i, y_i)$ and radii $r_i$.
On the other hand, the circles numbered $N + 1, N + 2, N + 3, \cdots, N + M$ have fixed center coordinates $(x_i, y_i)$ but their radii are not determined.
The circles used in the emblem may touch each other, but no circle should intersect or contain another circle. Maximize the radius of the smallest circle.
Input Format
The input is given from the standard input in the following format:
$N$ $M$ $x_1$ $y_1$ $r_1$ $x_2$ $y_2$ $r_2$ $:$ $:$ $x_N$ $y_N$ $r_N$ $x_{N+1}$ $y_{N+1}$ $x_{N+2}$ $y_{N+2}$ $:$ $:$ $x_{N+M}$ $y_{N+M}$
Output Format
Output the maximum possible radius of the smallest circle in one line.
The answer will be considered correct if the relative or absolute error is within $10^{-6}$.
Sample Input and Output
Sample Input #1
0 2
6 3
2 4
Sample Output #1
2.061552812808830
Sample Input #2
0 5
8 6
9 1
2 0
1 0
0 1
Sample Output #2
0.500000000000000
Sample Input #3
3 0
5 2 3
-1 0 2
2 -6 4
Sample Output #3
2.000000000000000
Sample Input #4
1 1
0 0 5
6 -3
Sample Output #4
1.708203932499369
Notes/Hints
Constraints
- $N$ is an integer between $0$ and $100$ inclusive.
- $M$ is an integer between $0$ and $100$ inclusive.
- $N + M \geq 2$.
- $x_i, y_i (1 \leq i \leq N + M)$ are integers between $-100$ and $100$ inclusive.
- $r_i$ is an integer between $1$ and $100$ inclusive.
- All given coordinates are distinct.
- The circles numbered $1, 2, 3, \cdots, N$ do not intersect, and no circle contains another.
- The circles numbered $N + 1, N + 2, N + 3, \cdots, N + M$ are not inside or on the circumference of the circles numbered $1, 2, 3, \cdots, N$.
Subtasks
Subtask $1$ [$70$ points]
- $N = 0$.
- $M = 2$.
Subtask $2$ [$140$ points]
- $N = 0$.
Subtask $3$ [$90$ points]
- No additional constraints.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分