ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Linear Data Structures: Arrays > задача:


51148 - Circles

Гость
• Вопросы к жюри (1)

Задачи раздела

• 50972 - Division
• Question 1
• 51135 - Class Average 1
• 51136 - Class Average 2
• 51094 - Passing the course
• 51130 - Permutation of Everything
• 51069 - Last Digit of a Fibonacci Nu...
• 51073 - Campus Tours for High Sch...
• 51148 - Circles
• 51123 - Mr. Li Criteria
• 51124 - Easy Tiae words
• 51145 - Graduation Exam
• 51117 - The Most Crowded
• 51146 - Popular Baby Names
• 51131 - Running After a Thief
• 51143 - Departments Competition
• 50994 - The Most Crowded Station

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2500/5000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
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).



Для отправки решений необходимо выполнить вход.

www.contester.ru