# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154415 | arnold518 | Cake 3 (JOI19_cake3) | C++14 | 1334 ms | 202476 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;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 2e5;
struct Cake
{
int V, C;
bool operator < (const Cake &p) { return C<p.C; }
}A[MAXN+10];
int N, M, S;
ll ans=-1e18;
vector<int> comp;
int getcomp(int x) { return lower_bound(comp.begin(), comp.end(), x)-comp.begin(); }
struct Node
{
ll cnt, sum;
Node *lc, *rc;
Node() : cnt(0), sum(0), lc(NULL), rc(NULL) {}
};
Node *tree[MAXN+10];
void makeTree(Node *node, int tl, int tr)
{
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... |