# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
769591 | GordonRemzi007 | XORanges (eJOI19_xoranges) | C++17 | 425 ms | 7896 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>
#include <vector>
#include <cmath>
using namespace std;
class SegmentTree {
int n, i = 0;
vector<int> seggy;
public:
SegmentTree(int size):n(size) {
seggy = vector<int>(2*n);
}
void push(int x) {
seggy[n+i] = x;
i++;
}
void build() {
for(int i = n-1; i > 0; i--) seggy[i] = seggy[2*i]^seggy[2*i+1];
}
void update(int x, int y) {
x+=n;
seggy[x] = y;
while(x > 1) {
x/=2;
seggy[x] = seggy[2*x]^seggy[2*x+1];
}
}
int query(int x, int y) {
int res = 0;
# | 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... |