#include <cstdio>
#include <cstdlib>
using namespace std;
typedef long long int int64;
int64 arr[1000001];
int main(){
int n, q; scanf("%d %d", &n, &q);
arr[0] = 0;
for(int lx = 1;lx <= n;lx++){
int64 inp;
scanf("%lld", &inp);
arr[lx] = arr[lx-1]^inp;
}
while(q--){
int a, b; scanf("%d %d", &a, &b);
printf("%lld\n", arr[a-1]^arr[b]);
}
return 0;
}
沒有留言:
張貼留言