제출 #972602

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9726022024-04-30 17:33:28vjudge1XORanges (eJOI19_xoranges)C++17
100 / 100
144 ms6080 KiB
#include <bits/stdc++.h>
using namespace std;
int n, q, od[600010], ev[600010], c, id, va, in, st, en, f, s, enu, onu;
void update(int l, int r, int idx, int val, int node, int (&seg)[600010]) {
if(l == r) {
seg[node] = val;
return;
}
int mid = (l+r)>>1;
if(idx <= mid) update(l, mid, idx, val, node*2, seg);
else update(mid+1, r, idx, val, node*2+1, seg);
seg[node] = seg[node*2]^seg[node*2+1];
}
int query(int l, int r, int ql, int qr, int node, int (&seg)[600010]) {
if(l > qr || r < ql) return 0;
if(l >= ql && r <= qr) return seg[node];
int mid = (l+r)>>1;
return query(l, mid, ql, qr, node*2, seg)^query(mid+1, r, ql, qr, node*2+1, seg);
}
int main() {
cin.tie(0)->sync_with_stdio(0);
cin >> n >> q;
for(int i=1; i<=n; i++) {
cin >> in;
if(i%2) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...