func main() var n: int :: cui@inputInt() var q: int :: cui@inputInt() var a: []int :: #[n]int for i(0, n - 1) do a[i] :: cui@inputInt() end for var cum: []bit64 :: #[n + 1]bit64 for i(1, n) do cum[i] :: cum[i - 1].xor(a[i - 1] $ bit64) end for for(1, q) var l: int :: cui@inputInt() var r: int :: cui@inputInt() var ans: int :: cum[r].xor(cum[l - 1]) $ int do cui@print("\{ans}\n") end for end func