I m given a sequence A1, A2, ..., AN and Q queries. In each query, you are given two parameters L and R; I have to find the smallest integer X such that 0 ≤ X < 231 and the value of (AL xor X) + (AL+1 xor X) + ... + (AR xor X) is maximum possible. please give me a hint to solve this