# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
379031 | leinad2 | Cake 3 (JOI19_cake3) | C++17 | 1397 ms | 124268 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;
struct node
{
int l, r, v;
long long sum;
}nd;
node pst[5000010];
pair<int, int>A[200010];
map<int, int>x, y;
map<int, int>::iterator it;
int t, n, q, a, b, c, d, i, j, sz, m, rt, cnt, root[200010], opt[200010], X[200010], Y[200010];
long long dap=-1e18;
void make_node(){pst[sz++]={-1, -1, 0, 0};}
void init(int id, int s, int e)
{
if(s==e)return;
int m=s+e>>1;
if(pst[id].l==-1)
{
pst[id].l=sz;
make_node();
}
init(pst[id].l, s, m);
if(pst[id].r==-1)
{
pst[id].r=sz;
make_node();
}
init(pst[id].r, m+1, e);
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... |