#Lutece0271. Sequence
Sequence
Migrated from Lutece 271 Sequence
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Giving a collection S of points on two dimension plane. ( {}) We define a point is greater than another point when all its coordinate on two axis are both greater than or equel to another one. Namely, is greater than when and . A sequence is a list points < > satisfy that is greater than . You can use the elements in to construct sequences, how many sequences needed to cover a at least?
Input
The input consists of several test cases. Each test case start with a line containing a number , the number of points in . Then lines follows, each line containing two number, , the position of point . The input end with EOF.
Output
You have to print minium number of sequences needed to cover in a single line for each case.
Samples
4
1 1
2 2
3 3
4 4
4
1 5
2 6
2 3
3 4
1
2
Resources
厦门大学第四届程序设计竞赛 现场决赛