| MEPhI Аutumn Cup 2025 |
|---|
| Finished |
While playing table tennis, Andrew-13 wondered if it is possible to finish the game exactly after round $$$x$$$.
Regular table tennis continues until one of the players scores at least 11 points with a lead of at least 2 points over the other player, but games with such rules can end quickly. Therefore, Andrew-13 decided to consider tennis where the game continues until one of the players scores at least $$$n$$$ points with a lead of at least $$$k$$$ points.
Initially, each player has $$$0$$$ points. Then the game rounds begin. Each round ends with one of the two players winning (there are no draws), who receives $$$+1$$$ point. As soon as one of the players has at least $$$n$$$ points and is at least $$$k$$$ points ahead of the opponent, the game ends.
You need to determine for $$$t$$$ possible parameters $$$n, k$$$, and $$$x$$$, whether the game can end exactly after round $$$x$$$ (rounds are numbered starting from $$$1$$$).
The first line of input contains the number $$$t\, (1 \le t \le 10^3)$$$ – the number of possible parameters.
Each of the following $$$t$$$ lines contains three numbers $$$n, k, x$$$ $$$(1 \le n, k, x \le 10^9)$$$.
For each set of input data, output «Yes» on a separate line if the game can end exactly after round $$$x$$$; otherwise, output «No».
511 2 1311 2 211 1 10010 2 172 3 998244353
Yes No No Yes Yes
| Name |
|---|


