# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
129410 | PeppaPig | Cake 3 (JOI19_cake3) | C++14 | 1631 ms | 213608 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 long long long
#define pii pair<int, int>
#define x first
#define y second
using namespace std;
const int N = 2e5+5;
vector<int> coord;
map<int, int> M;
struct node {
long sum, cnt;
node *l, *r;
node(long sum, long cnt, node *l, node *r) : sum(sum), cnt(cnt), l(l), r(r) { }
};
node* newleaf(long sum, long cnt) {
return new node(sum, cnt, nullptr, nullptr);
}
node* newpar(node *l, node *r) {
return new node(l->sum + r->sum, l->cnt + r->cnt, l, r);
}
node* build(int l = 1, int r = coord.size()) {
if(l == r) return newleaf(0, 0);
int mid = (l + r) >> 1;
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... |