loj#P2586. 「APIO2018」选圆圈
「APIO2018」选圆圈
Description
Given circles on a flat Cartesian plane. We attempt to do the following:
- Find the circle with the largest radius. If there are multiple candidates all having the same (largest) radius, choose the one with the smallest index. (i.e. minimize ).
- Remove and all the circles intersecting with . Two circles intersect if there exists a point included by both circles. A point is included by a circle if it is located in the circle or on the border of the circle.
- Repeat 1 and 2 until there is no circle left.
We say is eliminated by if is the chosen circle in the iteration where is removed. For each circle, find out the circle by which it is eliminated.
Input
The first line contains an integer , denoting the number of circles .
Each of the next lines contains three integers representing the -coordinate, the -coordinate, and the radius of the circle
Output
Output integers in the first line, where means that is eliminated by
11
9 9 2
13 2 1
11 8 2
3 3 2
3 12 1
12 14 1
9 8 5
2 8 2
5 2 1
14 4 2
14 14 1
7 2 7 4 5 6 7 7 4 7 6
Limits And Hints
Subtask 1 (7 points):
Subtask 2 (12 points): for all circles.
Subtask 3 (15 points): , every circle intersects with at most 1 other circle.
Subtask 4 (23 points): , all circles have the same radius.
Subtask 5 (30 points):
Subtask 6 (13 points):