Time Limit: 5000/2500 MS (Java/Others)

Memory Limit: 131072/131072 K (Java/Others)

There are $n$ noobs in the team, the $i$-th of which has a rating $a_i$.

The coach asks

Now, you are in charge of making the list for

There are multiple test cases (about $10$).

For each test case:

The first line contains five integers $n, m, A, B, C$. $(1 \leq n \leq 10^7, 1 \leq m \leq 100)$

The second line contains $m$ integers, the $i$-th of which is the number $b_i$ of the $i$-th hint. $(0 \leq b_i < n)$

The $n$ noobs' ratings are obtained by calling following function $n$ times, the $i$-th result of which is $a_i$.

For each test case:

The first line contains five integers $n, m, A, B, C$. $(1 \leq n \leq 10^7, 1 \leq m \leq 100)$

The second line contains $m$ integers, the $i$-th of which is the number $b_i$ of the $i$-th hint. $(0 \leq b_i < n)$

The $n$ noobs' ratings are obtained by calling following function $n$ times, the $i$-th result of which is $a_i$.

unsigned x = A, y = B, z = C;

unsigned rng61() {

unsigned t;

x ^= x << 16;

x ^= x >> 5;

x ^= x << 1;

t = x;

x = y;

y = z;

z = t ^ x ^ y;

return z;

}

提交代码