# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
106183 | mzhao | Cake 3 (JOI19_cake3) | C++11 | 3238 ms | 31964 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;
#ifdef DEBUG
#define D(x...) printf(x)
#else
#define D(x...)
#endif
#define MN 200100
#define x first
#define y second
using ll = long long;
ll N, M, pos[MN], ans = -1e17;
pair<ll, ll> A[MN], ord[MN];
pair<ll, ll> t[4*MN]; // (cnt, sum)
struct State {
ll l, h; // where the endpoint can be [l, h)
ll ansl, ansh; // where the optimal point can be [ansl, ansh)
};
vector<State> level[20];
void update(ll n, ll a, ll b, ll x, ll v) {
if (a == b-1) {
if (v > 0) t[n].x++;
else t[n].x--;
t[n].y += v;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |