#P2107. 小 Z 的 AK 计划
小 Z 的 AK 计划
Description
In Xiao Z's hometown, there is a street of computer labs, with many labs. Each lab has ten thousand people solving problems. Xiao Z just finished CodeChef and is going for a walk.
There are computer labs on the street. The -th lab is at coordinate , and Xiao Z's home is at . Xiao Z moves at speed , that is, the time from to is .
Each lab has a different number of students, and their ACM problem levels vary. After reaching lab , Xiao Z can spend time thinking, and then instantly "AK"; of course, he can also pass by without entering.
Xiao Z now has only units of time. After that, he must hurry to Codeforces. He wants to know the maximum number of labs he can "AK". Please help him.
Input Format
The first line contains two integers .
The next lines each contain two integers .
Output Format
Output one integer: the maximum number of labs Xiao Z can "AK".
2 10
1 100
5 5
1
Hint
For of the testdata, .
For of the testdata, .
For of the testdata, , , .
Translated by ChatGPT 5
京公网安备 11011102002149号