you are provided 4 numbers i.e n,x,y,z,t and n elements of an array.
for every i in x<=i<z and j in y<=j<t we have to find arr[i] & arr[j] and store it to a new array and the find xor of all elements of new array.
Example:
n=5 x=3 y=1 z=3 t=4
arr=2,29,67,50,47
Output will be
66
ans=0
for i in range(x,z):
for j in range(y,t):
ans^=(arr[i]&arr[j])as above code gives correct output but there is time limit problem.
can u suggest better way or if there is any efficient way of performing Xor operation.

