# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
114585 | tincamatei | Cake 3 (JOI19_cake3) | C++14 | 1370 ms | 202656 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;
const int MAX_N = 200000;
const long long INF = 1LL << 60;
struct PersistentSegtree {
int cnt;
long long sum;
PersistentSegtree *lT, *rT;
PersistentSegtree() {
cnt = 0;
sum = 0LL;
lT = rT = NULL;
}
};
PersistentSegtree* build(int l, int r) {
int mid = (l + r) / 2;
PersistentSegtree* node = new PersistentSegtree();
if(l < r) {
node->lT = build(l, mid);
node->rT = build(mid + 1, r);
}
return node;
}
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... |