# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
943780 | stefanneagu | XORanges (eJOI19_xoranges) | C++17 | 459 ms | 22060 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 <bits/stdc++.h>
using namespace std;
const int nmax = 5e5 + 1;
struct AINT {
int aint[nmax * 4];
void init() {
memset(aint, 0, sizeof(aint));
}
void update(int nod, int st, int dr, int poz, int val) {
if(st == dr) {
aint[nod] = val;
return;
}
int mid = (st + dr) / 2;
if(poz <= mid) {
update(nod * 2, st, mid, poz, val);
} else {
update(nod * 2 + 1, mid + 1, dr, poz, val);
}
aint[nod] = (aint[nod * 2] ^ aint[nod * 2 + 1]);
}
int query(int nod, int st, int dr, int l, int r) {
if(l <= st && dr <= r) {
return aint[nod];
# | 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... |