Roba's dream

Time Limit: 10000ms
Memory Limit: 65536KB
This problem will be judged on HDU. Original ID: 3399
64-bit integer IO format: %I64d      Java class name: Main

Description

LCY has made comments to HDU-ACM team leaders, “some team leaders can change girl ACMers into their girl friends, it’s a great job; but menjitianya2007 can make his girl friend be an ACM partner, it’s great beyond .”(http://blog.sina.com.cn/s/blog_5dc12a880100c6n1.html) Yes , it is true that there are many lovers in ACM teams, boy ACMers’ nuttiness and patience attract PLMMs. How to catch the girls’ heart? So as to realize roba’s third dream(http://roba.ycool.com/post.1738620.html) , lxhgww decides to invite the lovers in all ACM teams and let them talk something about their love experience.

lxhgww decide to choose at most one of each couple to talk about their experience. He thought people in different height have different love experience, so he would like to invite ACMers with different height to give a talk, what’s more, the shortest one (and also the first one) invited should always be 1.500000m and the (i+1)th ACMer should be exactly taller than the ith one by 0.000001m. Now,lxhgww want to the maximal number of ACMers he can invite. If he invited ACMers whose heights are1.500000,1.500001,but he can't invite a 1.500002m tall,then 2 will be the maximal number.

Input

The first line is the case number T(<=15).
For each case, there is an integer N(<=1000000) in the first line indicating N couples of lovers.
The next N lines of each case have two numbers round to 6 decimals each, they are the height of the ith couple of ACMers, all are no shorter than 1.5m.,and no higher than 2.0m.

Output

For each case, output the maximal number of ACMers he can invite.

Sample Input

1
3
1.500000 1.500001
1.500002 1.500001
1.500003 1.500004

Sample Output

2

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .