407963: GYM102951 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.
InputThe first line contains one integer N ($$$1 \leq N \leq 1000$$$), number of circles.
The next N lines contain two integers each $$$C_i$$$ and $$$R_i$$$ ($$$1 \leq C_i, R_i \leq 100$$$), coordinate of the center and radius of each circle. Two circles with the same radius will always be centered at different coordinates.
OutputOutput one integer, the smallest number of circles that have to be removed such that no pair of remaining circles intersects.
ExamplesInput6 2 1 5 1 6 1 1 2 3 2 4 3Output
2Input
7 40 30 25 15 35 5 70 20 60 30 60 10 80 10Output
2Note
In the first example, if we remove $$$(5,1)$$$ and $$$(1,2)$$$, the remaining circles do not intersect.
The circles in the image above also correlate with the first example.