| ICPC Masters Mexico 2026 |
|---|
| Закончено |
The contest hall already has $$$P$$$ help desks, and $$$K$$$ teams are sitting at their tables. When a team needs paper, a printout or a new keyboard, one of its members walks to the nearest help desk. The hall is one open floor without walls, so the walk is measured with the ordinary straight-line (Euclidean) distance.
The organizers have enough volunteers to open exactly one more help desk. Its location may be any point of the hall with real-valued coordinates: it does not have to be one of the given integer points, and it is allowed to coincide with an existing help desk or with a team table.
After the new help desk is opened, every team walks to whichever help desk — an existing one or the new one — is closer to its table. The organizers are judged by the team that walks the most, so they want to choose the location of the new help desk so that the longest walk made by any team is as short as possible.
Help them find this minimum possible value.
The first line contains two integers $$$P$$$ and $$$K$$$ ($$$1 \le P, K \le 10^5$$$) — the number of existing help desks and the number of teams.
Each of the next $$$P$$$ lines contains two integers $$$x$$$ and $$$y$$$ ($$$-10^6 \le x, y \le 10^6$$$) — the coordinates of an existing help desk.
Each of the next $$$K$$$ lines contains two integers $$$x$$$ and $$$y$$$ ($$$-10^6 \le x, y \le 10^6$$$) — the coordinates of a team table.
Two or more existing help desks may coincide, two or more teams may sit at the same point, and a team table may coincide with an existing help desk.
Print one real number — the minimum possible value, over every choice of location for the new help desk, of the largest distance walked by any team.
Your answer is considered correct if its absolute or relative error does not exceed $$$10^{-6}$$$.
2 10 010 03 7
0.0000000000
1 20 03 43 -4
4.0000000000
1 30 03 43 -41 0
4.0000000000
In the first example there is only one team, so the new help desk can be opened exactly at that team's table. Their walking distance becomes $$$0$$$, which is clearly the best possible value.
In the second example both teams are at distance $$$5$$$ from the only existing help desk. Opening the new help desk at $$$(3,0)$$$ puts it at distance $$$4$$$ from each of them, so both now walk $$$4$$$. No location can serve both teams with a smaller distance, because they are $$$8$$$ apart from each other, so any single point that is within some distance $$$r$$$ of both of them must have $$$r \ge 4$$$.
The third example adds a third team at $$$(1,0)$$$, already only $$$1$$$ away from the existing help desk. This team is comfortable regardless of where the new help desk is opened, so the answer is unchanged from the second example: the new help desk is still best placed at $$$(3,0)$$$, giving the same value $$$4$$$.
| Название |
|---|


