# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
263354 | keko37 | Cake 3 (JOI19_cake3) | C++14 | 1472 ms | 12008 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;
typedef long long llint;
typedef pair <int, int> pi;
const int MAXN = 200005;
const llint INF = 1000000000000000000LL;
llint n, m, sum, sol = -INF, br;
pi p[MAXN];
int pos[MAXN], fen[MAXN];
vector <pi> v, saz;
bool cmp (pi a, pi b) {
return a.second < b.second;
}
void fen_ubaci (int x, int k) {
for (; x < MAXN; x += x&-x) fen[x] += k;
}
int get () {
int res = 0;
for (int i = 17; i >= 0; i--) {
if (res + (1 << i) < MAXN && fen[res + (1 << i)] == 0) res += (1 << i);
}
return res + 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |