# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198985 | osaaateiasavtnl | Triple Jump (JOI19_jumps) | C++14 | 1219 ms | 133700 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 int long long
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcount
#define ll long long
#define mp make_pair
#define f first
#define s second
#define Time (double)clock()/CLOCKS_PER_SEC
const int N = 5e5 + 7, INF = 1e18 + 7;
int n, q, a[N], ans[N];
vector <ii> add[N], d[N];
int tree[N << 2], prop[N << 2], mx[N << 2];
void relax(int v) {
tree[v] = max(tree[v * 2 + 1], tree[v * 2 + 2]);
mx[v] = max(mx[v * 2 + 1], mx[v * 2 + 2]);
}
void gap(int v, int x) {
prop[v] = max(prop[v], x);
tree[v] = max(tree[v], mx[v] + x);
}
void push(int v) {
if (prop[v]) {
gap(v * 2 + 1, prop[v]);
gap(v * 2 + 2, prop[v]);
prop[v] = 0;
}
# | 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... |