# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1141168 | anmattroi | Cake 3 (JOI19_cake3) | C++17 | 466 ms | 81400 KiB |
/*******************************************
Task: JOI19_Cake3
Link: https://oj.uz/problem/view/JOI19_cake3
*******************************************/
#include <bits/stdc++.h>
#define maxn 200005
#define fi first
#define se second
using namespace std;
using ii = pair<int, int>;
using li = pair<int64_t, int>;
int n, k;
ii a[maxn];
template<class T> inline constexpr void cmax(T &x, const T &y) {if (x < y) x = y;}
int64_t sum[22*maxn];
int b[maxn], n1 = 0, root[maxn];
int it[22*maxn], L[22*maxn], R[22*maxn], nt = 0;
int build(int lo = 1, int hi = n1) {
if (lo == hi) return ++nt;
int cur = ++nt, mid = (lo + hi) >> 1;
L[cur] = build(lo, mid);
R[cur] = build(mid+1, hi);
return cur;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |