Berta has a list of $$$n$$$ tasks. The $$$i$$$-th task requires $$$t_i$$$ seconds to be completed. Additionally, each task has a deadline $$$p_i$$$: the $$$i$$$-th task must be completed before more than $$$p_i + t_i$$$ seconds have passed since the start (therefore, it must be started at second $$$p_i$$$ or earlier).
Berta wants to perform the tasks strictly in the order they are written in her list, being able to skip some of them.
Help Berta determine the maximum number of tasks from her list that she can complete.
The first line contains an integer $$$T$$$, the number of cases to process.
Each case begins with a line containing an integer $$$n$$$, the number of tasks. This is followed by $$$n$$$ lines, the $$$i$$$-th of which contains the two integers $$$t_i$$$ and $$$p_i$$$.
For each case, print a line with the maximum number of tasks that can be completed.
352 01 11 12 23 4210000 1000000001 9999108 255 127 1011 283 186 3210 455 347 286 42
4 1 7
| Name |
|---|


