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$.
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; }