You are given spheres in three-dimensional space by Evan. Each sphere is centered at and has a radius of . Two spheres intersect if there is a non-zero volume that overlaps. This means that two spheres that touch are not considered intersecting.
Out of the spheres, you want to choose a subset of spheres, such that the no pair of spheres intersect one other, and contains the most spheres.
How many spheres are in the largest subset?
The first line will contain the integer .
The next lines will each contain four integers, .
Output the size of the largest subset , such that no pair of spheres in the subset intersects one another.
Subtask 1 [20%]
Subtask 2 [10%]
Subtask 3 [20%]
Subtask 4 [50%]
No further constraints.
Sample Input 1
1 0 0 0 3
Sample Output 1
Explanation For Sample 1
You are given sphere centered at having a radius of . Of course, this sphere can be in the subset. Thus, the size of the largest subset is .
Sample Input 2
4 2 3 3 1 3 -5 10 3 0 0 0 5 4 3 0 1
Sample Output 2
Explanation For Sample 2
Note that you do not need to pass this sample to pass some of the subtasks.
The largest subset consists of selecting the first sphere, the second sphere, and the fourth sphere.
This can be seen from the image below:
The red sphere is the first sphere, the orange sphere is the second sphere, the blue sphere is the third sphere, and the green sphere is the fourth sphere.