# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
767922 | Dan4Life | Two Currencies (JOI23_currencies) | C++17 | 646 ms | 80084 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;
using ll = long long;
using ar = array<ll,2>;
#define pb push_back
#define all(a) begin(a),end(a)
const int mxN = (int)1e5+10;
const int mxN2 = mxN*135;
const int mxLg = 17;
ar seg[mxN2];
int n, m, q, IND=1;
int jmp[mxLg][mxN];
vector<ar> adj[mxN];
vector<ll> v[mxN], w;
int L[mxN2], R[mxN2];
int lev[mxN], ro[mxN], orig[mxN*2];
int newChild(int p, int v){
int p2 = ++IND;
L[p2] = L[p], R[p2] = R[p];
seg[p2]={seg[p][0]+v,seg[p][1]+1};
return p2;
}
int newPar(int l, int r){
int p = ++IND; L[p] = l, R[p] = r;
for(int i : {0,1}) seg[p][i] = seg[l][i]+seg[r][i];
return p;
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |