## LCC/Moose '19 Contest 2 J5 - Evan's Wrath

View as PDF

Points: 10 (partial)
Time limit: 1.0s
Java 1.5s
Python 1.5s
Memory limit: 128M

Author:
Problem type

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?

#### Input Specification

The first line will contain the integer  .

The next lines will each contain four integers,  .

#### Output Specification

Output the size of the largest subset , such that no pair of spheres in the subset intersects one another.   No further constraints.

#### Sample Input 1

1
0 0 0 3

#### Sample Output 1

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

3

#### 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.