# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
747576 | nguyentunglam | Cake 3 (JOI19_cake3) | C++17 | 876 ms | 203332 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 endl "\n"
#define ii pair<int, int>
using namespace std;
const int N = 2e5 + 10;
pair<int, int> a[N];
int n, m;
long long ans = -2e18;
struct node {
node * left;
node * right;
int cnt;
long long sum;
node () : cnt(0), sum(0), left(nullptr), right(nullptr) {}
};
void build(node *p, int l, int r) {
if (l == r) return;
int mid = l + r >> 1;
p -> left = new node(); p -> right = new node();
build(p -> left, l, mid);
build(p -> right, mid + 1, r);
}
void up(node *p, int l, int r, int pos, int val) {
if (l == r) {
p -> sum += val;
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... |