#include #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define all(c) c.begin(),c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x,y) x=min(x,y) #define chmax(x,y) x=max(x,y) using namespace std; template ostream& operator<<(ostream& o,const pair &p){return o<<"("< ostream& operator<<(ostream& o,const vector &vc){o<<"sz = "<>7); seed = seed ^ (seed<<17); int res = (seed>>33); assert(0<=res && res<=(1LL<<31)-1); return res; } const int X = 17; const int B = 1< a; int acc[B+1]; int main(){ int N,Q; cin>>N>>Q>>seed; assert(N == 200000); assert(Q == 50000000); assert(1 <= seed && seed <= 1000000000); a.resize(N); rep(i,10000) next(); rep(i,N){ int x = next(); a[i] = x; int b = x>>(31-X); acc[b+1]++; } sort(all(a)); rep(i,B) acc[i+1] += acc[i]; ll res = 0; rep(qt,Q){ int x = next(); int b = x>>(31-X); int cnt = lower_bound(a.begin()+acc[b],a.begin()+acc[b+1],x) - a.begin(); res ^= ll(cnt)*qt; } cout<