#include <bits/stdc++.h>
using namespace std;
struct seg {
int sz = 1 << 19, tree[1 << 20];
void build() {
for(int i = sz-1; i >= 1; i--) {
tree[i] = tree[i*2] + tree[i*2+1];
}
}
void update(int x, int v) {
x += sz;
tree[x] = v;
while (x >= 1) {
tree[x] = tree[x*2] + tree[x*2+1];
x /= 2;
}
}
int qurey(int l, int r) {
int sum = 0;
for(l += sz, r += sz; l <= r; l /= 2, r /= 2) {
if(l % 2 == 1) {
sum += tree[l];
l++;
}
if(r % 2 == 0) {
sum += tree[r];
r--;
}
}
return sum;
}
};
int main() {
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: