# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
197552 | Juney | Cake 3 (JOI19_cake3) | C++14 | 971 ms | 126844 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 fi first
#define se second
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 2e5 + 5;
ll N, M, ans = -1e18;
pii A[MAXN];
ll comp[MAXN], root[MAXN];
int get_idx(ll val) { return lower_bound(comp+1, comp+1+N, val) - comp; }
struct PST {
struct NODE { ll l, r, cnt, sum; } T[MAXN * 30];
int sz;
int make(int v, int l, int r, int n) {
if(r < v || v < l) return n;
int cur = ++sz;
T[cur] = T[n];
if(l != r) {
int mid = l + r >> 1;
T[cur].l = make(v, l, mid, T[n].l);
T[cur].r = make(v, mid+1, r, T[n].r);
}
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... |