Help needed in an Intuit OA question

Правка en1, от HEIR_OF_SLYTHERIN, 2022-08-19 16:46:18

Question: You are given N circles, with ith represented by coordinates of centre as xi,yi and radius ri(all circles lie on the xy plane). The task is to remove minimum number of circles such that the remaining circles do not overlap or touch each other.
Note: Ci, Cj are overlapping is the distance between their centre points <=ri+rj.
Constraints:
2<=N<=1000
0<=xi,yi,ri<=10000
Input format:
First line contains N
The next N lines contains three integers xi,yi,ri.
Sample input:
3
0 0 3
2 0 3
4 0 3
Sample output
2

Any help in algo or idea is appreciated. Thanks in Advance.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский HEIR_OF_SLYTHERIN 2022-08-19 16:46:18 717 Initial revision (published)