# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
596772 | Cookie | XORanges (eJOI19_xoranges) | C++14 | 177 ms | 16116 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define vt vector
#define pb push_back
const int mxn = 2e5 + 3;
ll a[mxn];
int n, q;
ll odd[mxn * 4] = {}, even[mxn * 4] = {};
void build(int nd, int l, int r){
if(l == r){
if(l % 2 == 0)even[nd] = a[l];
else odd[nd] = a[l];
return;
}
int mid = (l + r) >> 1;
build((nd << 1), l, mid); build((nd << 1) + 1, mid + 1, r);
odd[nd] = odd[(nd << 1)] ^ odd[(nd << 1) + 1]; even[nd] = even[(nd << 1)] ^ even[(nd << 1) + 1];
}
void upd(int nd, int l, int r, int id, ll v){
if(id > r || id < l)return;
if(l == r){
even[nd] = v;
return;
}
int mid = (l + r) >> 1;
upd((nd << 1), l, mid, id, v); upd((nd << 1) + 1, mid + 1, r, id, v);
even[nd] = even[(nd << 1)] ^ even[(nd << 1) + 1];
}
void upd2(int nd, int l, int r, int id, ll v){
# | 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... |