#P12537. [XJTUPC 2025] 罗斯飞鸽
[XJTUPC 2025] 罗斯飞鸽
Description
Awa is participating in a live music game called Gros-Phi. In the event, Awa must appear at a specified location at a specified time.
Specifically, Gros-Phi's activity area is an infinitely long straight line. Gros-Phi has a total of scoring points. The -th scoring point requires Awa to appear at position at time .
Awa's maximum running speed is units per moment. At time , Awa can choose any position and then start playing Gros-Phi.
Awa wants to know how many scoring points she can reach at most.
Input Format
The first line contains a positive integer (), indicating that Awa played a total of games.
For each game, the first line contains two positive integers and (, ), separated by a space, indicating the number of decision points and the maximum speed of Awa.
The next lines, each containing two integers and (), separated by a space, describe a scoring point. It is guaranteed that there are no two identical scoring points in a game.
It is guaranteed that the sum of in rounds of games does not exceed .
Output Format
There should be lines in total, each line contains one integer, indicating how many scoring points Awa can reach at most in the corresponding game.
3
6 1
8 7
8 -6
10 -8
2 5
7 -9
1 0
6 1
0 -6
0 0
8 2
10 -8
9 -5
2 -9
6 1
7 4
8 -4
8 9
3 -9
1 0
7 2
3
2
2
Hint
Since the input and output data of this question are large, it is recommended to use a faster input and output method, such as and .
京公网安备 11011102002149号