# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
833119 | PurpleCrayon | Triple Jump (JOI19_jumps) | C++17 | 4056 ms | 91216 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;
#define sz(v) int(v.size())
#define ar array
typedef long long ll;
const int N = 5e5+10, INF = 1e9+10;
const int L = 50;
using ui = unsigned int;
// b - a <= c - b
// 2b <= a + c
// c >= 2b - a
// a >= 2b - c
// consider the O(log) biggest elements
// at least one of those must be in the optimal solution
int n, q, a[N];
ui ans[N];
int st[N][L];
vector<ar<int, 2>> qs[N];
ar<int, L> store[N];
int qry(int l, int r) {
if (l > r) return -INF;
int b = 31 - __builtin_clz(r - l + 1);
return max(st[l][b], st[r - (1 << b) + 1][b]);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |