# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
538996 | Monarchuwu | Triple Jump (JOI19_jumps) | C++17 | 830 ms | 50508 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<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define ff first
#define ss second
const int N = 5e5 + 5;
int n, q;
int a[N];
struct Query {
int l, r, id;
bool operator < (const Query &o) const { return l > o.l; }
} Q[N];
int st[N], top;
int cnt;
pii p[N << 1];
void init() {
for (int i = 1; i <= n; ++i) {
while (top && a[st[top]] < a[i]) --top;
if (top) p[++cnt] = pii(st[top], i);
st[++top] = i;
}
top = 0;
for (int i = n; i; --i) {
# | 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... |