# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
466517 | jhwest2 | Cake 3 (JOI19_cake3) | C++14 | 4067 ms | 122028 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>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#define va first
#define vb second
using namespace std;
typedef long long lint;
typedef pair<lint, lint> pint;
const int M = 2e5 + 10;
const lint INF = 4e18 + 10;
lint n, m, ans, A[M], B[M], D[M];
pair<lint, lint> X[M];
struct Pst {
struct Node {
lint cnt, val, l, r;
Node() = default;
} T[30 * M];
int size = 0, rt = 0, R[M];
int new_node() { return ++size; }
void init(int lo = 1, int hi = n, int idx = 0) {
if (lo == hi) return;
init(lo, lo + hi >> 1, T[idx].l = new_node());
init(1 + (lo + hi >> 1), hi, T[idx].r = new_node());
}
void update(int a, lint x) {
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... |