# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22949 | gs14004 | New Ocurrences (KRIII5_NO) | C++11 | 426 ms | 48980 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 <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pi;
typedef long long lint;
const int MAXN = 100005;
int n;
struct bit{
lint tree[MAXN];
lint sum;
void add(int x, lint v){
x++;
sum += v;
while(x <= n+1){
tree[x] += v;
x += x & -x;
}
}
lint query(int x){
if(x == n) return sum;
x++;
lint ret = 0;
while(x){
ret += tree[x];
x -= x & -x;
}
return ret;
}
}bl, br;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |