This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
int n, q; cin >> n >> q;
vector<int> a(n + 1);
for (int i = 1; i <= n; i++){
cin >> a[i];
}
while(q--){
int t, l, u; cin >> t >> l >> u;
int x = 0;
for (int i = 1; i <= u - l + 1; i++){
//cout << i << endl;
for (int j = l; j <= u - i + 1; j++){
//cout << "j:::::" << j << endl;
for (int k = j; k <= j + i - 1; k++){
x ^= a[k];
}
}
}
cout << x << endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |