# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
208684 | bensonlzl | Telefoni (COCI17_telefoni) | C++14 | 33 ms | 3368 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;
int PURQ_fenwick[600010], arr[600010];
void add(int x, int v){
for (;x <= 600000; x += (x & -x)){
PURQ_fenwick[x] += v;
}
}
int query(int x){
if (x == 0) return 0;
int sum = 0;
for (;x;x -= (x & -x)){
sum += PURQ_fenwick[x];
}
return sum;
}
int rquery(int l, int r){
return query(r) - query(l-1);
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie();
int N, D;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |