#arc156d. [arc156_d]Xor Sum 5

[arc156_d]Xor Sum 5

给定 nn 个数的数列 aa 和一个整数 kk。 对于所有长度为 kk,值域为 [1,n][1,n] 的数列 pp,求出 i=1kapi\sum _{i=1}^{k} a_{p_i} 的异或和。