11432: CF102951 - E. KRUZNICE
Description
There are $N$ circles on the coordinate axis defined by coordinate of their center, $C_i$, and radius, $R_i$.
Please determine the smallest number of circles that have to be removed such that there is no intersecting pair of circles among the remaining circles. Remaining circles are allowed to touch at one point.
Input
The first line contains one integer $N\ (1≤N≤1000)$, number of circles.
The next $N$ lines contain two integers each $C_i,R_i\ (1≤C_i,R_i≤100)$, coordinate of the center and radius of each circle. Two circles with the same radius will always be centered at different coordinates.
Output
Sample 1 Input
6
2 1
5 1
6 1
1 2
3 2
4 3
Sample 1 Output
2
if we remove (5,1) and (1,2), the remaining circles do not intersect.
The circles in the image above also correlate with this example.
Sample 2 Input
7
40 30
25 15
35 5
70 20
60 30
60 10
80 10
Sample 2 Output
2