# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
223194 | tqbfjotld | Putovanje (COCI20_putovanje) | C++14 | 152 ms | 19448 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;
#define MAX_N 200005
vector<pair<int,int> >adjl[200005];
int p[200005];
int h[200005];
int head[200005];
int pos[200005];
long long fenwick[MAX_N];
int cur = 0;
long long o1[200005];
long long o2[200005];
int val[200005];
int heavy[200005];
void update(int po, long long val){
//printf("upd %d with %d\n",po,val);
while (po<MAX_N){
fenwick[po] += val;
po += (po&(-po));
}
}
long long query(int a){
long long ans = 0;
while (a>0){
ans += fenwick[a];
a -= (a&(-a));
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |