# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
769591 | GordonRemzi007 | XORanges (eJOI19_xoranges) | C++17 | 425 ms | 7896 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |