# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
162364 | Anai | Triple Jump (JOI19_jumps) | C++14 | 1315 ms | 68004 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 N = 5e5 + 5;
struct Query {
int l, r, idx; };
struct Nod {
int maxval, maxans, enforce; };
int v[N], ant[N];
vector<int> nxt[N];
Nod pom[N * 4];
vector<Query> qs;
int n, q, ql, qr, qval;
static void get_nxt() {
vector<int> stk;
for (int i = 1; i <= n; ++i) {
while (!stk.empty() && v[stk.back()] <= v[i]) {
nxt[stk.back()].push_back(i);
stk.pop_back(); }
if (!stk.empty())
nxt[stk.back()].push_back(i);
stk.push_back(i); }
for (int i = 0; i + 1 < stk.size(); ++i) {
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |