| Codeforces Round 1059 (Div. 3) |
|---|
| Finished |
You are given two integers $$$a$$$ and $$$b$$$. You are allowed to perform the following operation any number of times (including zero):
After performing a sequence of operations, you want the value of $$$a$$$ to become exactly $$$b$$$.
Find a sequence of at most $$$100$$$ operations (values of $$$x$$$ used in each operation) that transforms $$$a$$$ into $$$b$$$, or report that it is impossible.
Note that you are not required to find the minimum number of operations, but any valid sequence of at most $$$100$$$ operations.
The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 1000$$$) — the number of test cases.
Each test case contains two integers $$$a$$$ and $$$b$$$ ($$$1 \le a, b \le 10^9$$$).
For each test case, if it is impossible to obtain $$$b$$$ from $$$a$$$ using the allowed operations, print a single line containing $$$-1$$$.
Otherwise, on the first line print a single integer $$$k$$$ ($$$0 \le k \le 100$$$) — the number of operations. On the second line print $$$k$$$ integers ($$$x_1, x_2, \dots , x_k$$$) — the chosen values of $$$x$$$ in the order you apply them.
If there are multiple valid sequences, you may print any one of them.
69 613 13292 929405 400998 244244 353
27 80-115225 779-1
For the first test case,
For the fourth test case, choosing $$$x = 5$$$ makes $$$a = b$$$.
| Name |
|---|


