# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
213326 | IOrtroiii | Constellation 3 (JOI20_constellation3) | C++14 | 361 ms | 72952 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 MAXN = 200200;
const int LG = 18;
using ll = long long;
int N, M;
int A[MAXN];
int rmq[LG][MAXN];
int best(int x, int y) {
if (A[x] > A[y]) return x;
else return y;
}
ll ans[MAXN], offset[MAXN];
multiset<pair<int, ll>> vals[MAXN];
int get(int l, int r) {
int lg = __lg(r - l + 1);
return best(rmq[lg][l], rmq[lg][r - (1 << lg) + 1]);
}
int solve(int l, int r, int lim) {
int v;
if (l == r) {
v = l;
} else {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |