XOR

Revision en1, by Partha_, 2018-03-05 23:51:46

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

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Partha_ 2018-03-05 23:51:46 287 Initial revision (published)