import random,time N,X=map(int,input().split()) A=list(map(int,input().split())) def solve_not_convolute(): data=[0 for i in range(2**18)] for i in range(N): data[A[i]]+=1 cum=[data[i] for i in range(2**18)] cum_s=[[data[i]*(i>>j &1) for j in range(18)] for i in range(2**18)] for i in range(1,2**18): for j in range(18): cum_s[i][j]+=cum_s[i-1][j] cum[i]+=cum[i-1] def cnt_s(r,x): id=x res=[0 for i in range(18)] cnt=0 for i in range(18,-1,-1): if r>>i &1: L=(id>>i)<0) for j in range(18): res[j]+=cum_s[R][j]-cum_s[L-1][j]*(L>0) id^=(1<>i &1: S+=(1<