Problem Statement
You are given a sequence of non-negative integers of length $N$: $A=(A_1,A_2,\ldots,A_N)$ and a non-negative integer $K$.
Determine whether it is possible to make $A_1=K$ by performing the following operation at most $10^4$ times:
- Choose an integer
$i\ (1\leq i\leq N-1)$. Let$x=A_i\oplus A_{i+1}$, then replace both$A_i,A_{i+1}$with$x$.
Here, $\oplus$ denotes the bitwise XOR operation.
If possible, output one such sequence of operations.
You are given $T$ test cases, so solve each of them.
What is bitwise XOR operation? The bitwise XOR of non-negative integers $A, B$, denoted $A \oplus B$, is defined as follows: When $A \oplus B$ is written in binary, the digit in the $2^k$ ($k \geq 0$) place is $1$ if exactly one of $A, B$ has $1$ in the $2^k$ place when written in binary, and $0$ otherwise. For example, $3 \oplus 5 = 6$ (in binary: $011 \oplus 101 = 110$).
Constraints
$1\leq T\leq 50$$3\leq N\leq 60$$0\leq A_i,K\lt 2^{60}$- All input values are integers.
Input
The input is given from Standard Input in the following format:
T
\mathrm{case}_1
\mathrm{case}_2
\vdots
\mathrm{case}_T
Each test case is given in the following format:
N K
A_1 A_2 \ldots A_N
Output
Output your solutions for $\mathrm{case}_1,\mathrm{case}_2,\ldots,\mathrm{case}_T$ in order in the following format:
If it is impossible to make $A_1=K$ by performing the operation at most $10^4$ times, output No.
If possible, output the sequence of operations in the following format:
Yes
M
i_1 i_2 \ldots i_M
Here, $M$ is the number of operations, and $i_j\ (1\leq j\leq M)$ represents the integer $i$ chosen in the $j$-th operation. You need to satisfy $0\leq M\leq 10^4, 1\leq i_j\leq N-1$.
If there are multiple sequences of operations that satisfy the conditions, any of them will be considered correct.
样例
5
3 5
2 3 4
3 0
2 3 4
3 8
2 3 4
3 2
2 3 4
4 10
2 3 4 8
Yes
2
2 1
Yes
3
1 1 1
No
Yes
0
Yes
4
2 3 2 1
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。