CEN110-Resit |
Start: July.12.2017 at 02:00:00 PM
Finish: July.12.2017 at 02:50:00 PM
The contest is finished!
• Contest scoreboard
|
Feedback | If you notice incorrect translations in Contester, please let author know.
|
|
Time limit 2500/5000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Question by Ibrahim Mesecan.
Circles
Question:
On a 2D plane, you are given information for n circles
and m points. List top k circles which overlap with
the most number of points. If two circles have the
same number of overlapping points, list them
according to the order of appearance (first circle is with the id 1).
Note:
The point is count overlapping,
also when it is on the edge of a circle.
Input specification:
In the first line, you will be given three integers:
the number of circles (n), the number of points (m)
and the number of top (k) circles to list.
The following n lines will contain 3 integers
(x, y, radius). Then, the following m lines
will contain (x, y) coordinates m points where 1 ≤ (m, n)
≤ 7,000.
Output specification:
Show k integers (order of circles).
Sample Input
4 6 2
2 3 1
2 5 1
4 1 2
3 2 2
2 1
4 5
2 5
4 2
1 2
3 4
|
Sample Output
4 3
|
Explanation:
There are four circles and 6 points given.
- The first circle (2, 3, 1) does not overlap with any point.
- The second circle overlaps with only one point (2, 5).
- The third circle (4, 1, 2) overlaps with 2 points.
- And, the fourth circle (3, 2, 2) overlaps with four points
(1, 2), (2, 1), (4, 2) and (3, 4).
Для отправки решений необходимо выполнить вход.
|