当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3399:Roba's dream

题目描述
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.
输入解释
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.
输出解释
For each case, output the maximal number of ACMers he can invite.
输入样例
1
3
1.500000 1.500001
1.500002 1.500001
1.500003 1.500004
输出样例
2
来自杭电HDUOJ的附加信息
Author lxhgww
Recommend lcy

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3399

最后修改于 2020-10-25T23:03:11+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000/10000MS(Java/Others) 32768/65536K(Java/Others)