eval"N,M,*A="+gets(p).split*?, curr = A[0...M].inject:^ loop.any?{ i = rand M j = rand N-M A[i], A[j] = A[j], A[i] curr ^= A[i] ^ A[j] curr == (1<<20)-1&&$><