# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
171966 | gs18103 | Cake 3 (JOI19_cake3) | C++14 | 1060 ms | 109660 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>
#define fi first
#define se second
#define eb emplace_back
#define em emplace
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
const int MAX = 101010;
const int INF = 1e9;
const ll LINF = 1e18;
struct Node {
int l, r, c; ll val;
Node(int l, int r, int c, ll val) : l(l), r(r), c(c), val(val) {}
};
pll arr[2*MAX];
int root[2*MAX], n, x;
vector <Node> tree;
vector <ll> num;
ll ans = -LINF;
void expand_tree(int s, int e, int k, int pnd, int cnd) {
tree[cnd].c = tree[pnd].c + 1;
tree[cnd].val = tree[pnd].val + num[k];
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... |