# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
969252 | duckindog | Triple Jump (JOI19_jumps) | C++17 | 721 ms | 62272 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 = 500'000 + 10;
int n;
int a[N];
int q;
vector<pair<int, int>> Q[N];
int f[N << 2], T[N << 2], lazy[N << 2];
void build(int s, int l, int r) {
if (l == r) {
T[s] = f[s] = a[l];
return;
}
int mid = l + r >> 1;
build(s << 1, l, mid); build(s << 1 | 1, mid + 1, r);
T[s] = max(T[s << 1], T[s << 1 | 1]);
f[s] = max(f[s << 1], f[s << 1 | 1]);
}
void push(int s) {
f[s << 1] = max(f[s << 1], T[s << 1] + lazy[s]);
f[s << 1 | 1] = max(f[s << 1 | 1], T[s << 1 | 1] + lazy[s]);
lazy[s << 1] = max(lazy[s << 1], lazy[s]);
lazy[s << 1 | 1] = max(lazy[s << 1 | 1], lazy[s]);
}
void update(int s, int l, int r, int u, int v, int x) {
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... |