| 2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) |
|---|
| Закончено |
You are given $$$n$$$ circles and two integer parameters $$$k$$$ and $$$\ell$$$. The $$$i$$$-th circle has radius $$$r_i$$$ and $$$r_i \ge r_j$$$ holds for every $$$1 \le i \lt j \le n$$$. The task is to draw these $$$n$$$ circles on a 2D plane so that the following conditions are simultaneously satisfied. Before proceeding to the conditions, let us recall that:
You need to draw these $$$n$$$ circles to satisfy all of the following conditions:
An arrangement that satisfies all the above conditions is called feasible. For a feasible arrangement $$$\mathcal{A}$$$, define its quality $$$d(\mathcal{A})$$$ as the minimum distance between any two points belonging to different circles.
If there exists at least one feasible arrangement for the given case, output the maximum possible quality among all feasible arrangements. If no feasible arrangements exist, output $$$0$$$.
A feasible arrangement for sample input 1.
An arrangement that is not feasible for sample input 1. The first line contains three integers $$$k$$$, $$$n$$$, and $$$\ell$$$, representing the maximum distance between centers, the number of circles to be drawn, and the number of circles that may or may not be enclosed by other circles, respectively.
The second line contains $$$n$$$ integers $$$r_1, r_2, \ldots, r_n$$$, where $$$r_i$$$ is the radius of the $$$i$$$-th circle.
If no feasible arrangements exist, output a single integer $$$0$$$.
Otherwise, output the maximum possible quality $$$d(\mathcal{A})$$$ among all feasible arrangements $$$\mathcal{A}$$$ in the following format:
15 4 3 7 5 3 1
3
14 6 1 7 5 4 3 2 1
1
14 2 2 5 4
5
22 4 4 4 4 1 1
10/3
13 3 3 6 3 1
4
Explanation of Example 1: A feasible arrangement is illustrated in the first figure, where each circle and its center are shown in a unique color.
In this arrangement, the minimum distance between any two points belonging to different circles is $$$3$$$, and the two points witnessing this distance are marked as red dots. Hence, the quality of this arrangement is $$$3$$$, which is the maximum possible among all feasible arrangements for this case. Note that only circle $$$4$$$ is required to be enclosed within another circle, while the remaining circles may or may not be enclosed.
The second figure shows an arrangement that is not feasible. In this case, circle $$$1$$$ encloses both circle $$$3$$$ and circle $$$4$$$, but neither of these two circles encloses the other, thereby violating condition $$$4$$$.
| Название |
|---|


