# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
219588 | manh9203 | Cake 3 (JOI19_cake3) | C++17 | 823 ms | 141692 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 ll long long
#define fi first
#define se second
const int N = 2e5 + 5;
int n, m;
ll V[N], C[N];
pair<ll, ll> a[N];
int inDex[N];
int nNode, rootVer[N];
ll ans;
struct node {
ll val, cnt, lef, rig;
} st[40 * N];
int build(int l, int r) {
if (l == r) {
int id = ++nNode;
st[id] = {0, 0, 0, 0};
return id;
}
int mid = (l + r) >> 1;
int id = ++nNode;
st[id].lef = build(l, mid);
st[id].rig = build(mid + 1, r);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |