Sum of xor over all the triplets.

Revision en1, by __noob__, 2018-06-27 17:21:53

Given an array of N integers and Q queries. For each query you are given two integers L and R(where L<=R<=N) you have to output the sum of xor over all the triplet i,j and k where L<=i<j<k<=R Constraints 1 <= N <=10^5 1 <= Q <=10^5 1 <= A[i] <=10^12

Can anybody help me out on how to solve this question?

Tags xor-sum

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English __noob__ 2018-06-27 17:21:53 345 Initial revision (published)