# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
838124 | BlockOG | XORanges (eJOI19_xoranges) | C++14 | 1046 ms | 5336 KiB |
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 <iostream>
using namespace std;
int main() {
int n, q; cin >> n >> q;
unsigned int o[n]; for (int i = 0; i < n; i++) cin >> o[i];
for (int it = 0; it < q; it++) {
int code; cin >> code;
if (code == 1) {
int i; cin >> i >> o[--i];
} else {
int u, l; cin >> u >> l;
if (!(u - l + 1 & 1)) continue;
unsigned int res = 0;
for (int i = u - 1; i < l; i += 2) {
res ^= o[i];
}
cout << res << endl;
}
}
}
Compilation message (stderr)
# | 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... |