|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|8 초 (추가 시간 없음)||512 MB||0||0||0||0.000%|
Major Mickle is commanded to protect a secret base which is being attacked by N tanks. Mickle has an ultimate laser rifle called Mickle's beam. Any object shot by this beam will be immediately destroyed, and there is no way for protection. Furthermore, the beam keeps going through even after destroying objects. The beam is such a powerful and horrible weapon, but there is one drawback: the beam consumes a huge amount of energy. For this reason, the number of shots should be always minimized.
Your job is to write a program that calculates the minimum number of shots required to destroy all the enemy tanks.
You can assume the following:
The input consists of an integer sequence.
The first integer indicates N (N ≤ 2,000). Each of the following N lines contains four integers which indicates the x- and y-coordinates of the lower-left corner and the upper-right corner of a tank respectively. You can assume that every coordinate may not exceed 10,000 in absolute value.
Output the minimum number of shots of the beam.
4 2 -1 3 1 -1 2 1 3 -3 -1 -2 1 -1 -3 1 -2
2 1 0 2 1 3 -1 4 0