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?