#P2694. 接金币
接金币
Description
In a 2D coordinate system, there are coins, numbered . Initially, the -th coin is at . All coins fall vertically downward by unit of height per second. For example, if a coin is currently at , then after seconds its position will be . Initially, FJ is at . FJ can move left or right by unit per second, and FJ may also stay still. If at some moment a coin’s position coincides with FJ’s position, then FJ can catch that coin. Determine whether FJ can catch all the coins. If yes, output , otherwise output .
Input Format
This problem has groups of testdata.
The first line contains an integer , indicating there are groups of testdata.
For each group of testdata, the format is as follows:
- The first line contains an integer .
- The next lines each contain two integers, representing for the -th coin.
Output Format
Output lines. For each group, output or .
5
3
-1 1
1 3
0 4
1
-3 2
3
-1 1
1 2
0 4
3
0 9
-1 1
1 3
8
70 141
-108 299
52 402
-70 280
84 28
-29 363
66 427
-33 232
Abletocatch
Notabletocatch
Notabletocatch
Abletocatch
Notabletocatch
Hint
For all testdata, , , , .
Translated by ChatGPT 5
京公网安备 11011102002149号