| TheForces Round #33(Wow-Forces) |
|---|
| Finished |
Mr. Wow has a multiset $$$S$$$ of size $$$n$$$. At first, $$$S = \{1,2,\ldots,n\}$$$.
Mr. Wow can do the following operation exactly $$$(n-1)$$$ times:
Determine if it's possible to make $$$S = \{m\}$$$ after $$$(n-1)$$$ operations. If it is possible, output any scheme.
The first line contains an integer $$$t$$$ $$$(1 \leq t \leq 10^5)$$$, the number of test cases.
For each test case, there is a single line containing two integers $$$n$$$ and $$$m$$$ $$$(2 \leq n \leq 2 \cdot 10^5,-\frac{n(n+1)}{2} \leq m \leq \frac{n(n+1)}{2})$$$.
It's guaranteed that the sum of $$$n$$$ over all test cases will not exceed $$$2 \cdot 10^5$$$.
For each test case:
53 03 14 64 105 -11
YES 3 2 1 1 NO YES 2 3 -1 4 1 -5 NO YES 2 3 -1 4 -5 5 -10 1
For the $$$1$$$-st test case, $$$S=\{1,2,3\}$$$ initially.
You can make $$$S = \{0\}$$$ using the following scheme:
For the $$$2$$$-nd test case, you can not make $$$S = \{1\}$$$.
| Name |
|---|


