# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1064681 | Sharky | Triple Jump (JOI19_jumps) | C++17 | 711 ms | 90452 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 + 8;
int n, q, a[N], ans[N], mx[N];
vector<int> pr[N];
vector<pair<int, int>> qry[N];
stack<pair<int, int>> stk;
struct Node {
int pf, sf, sum;
} seg[4 * N];
Node merge(Node lhs, Node rhs) {
Node res;
res.pf = max(lhs.pf, rhs.pf);
res.sf = max(lhs.sf, rhs.sf);
res.sum = max({lhs.sum, rhs.sum, lhs.pf + rhs.sf});
return res;
}
void build(int l, int r, int id) {
if (l == r) {
seg[id].pf = 0;
seg[id].sf = seg[id].sum = a[l];
return;
}
int mid = (l + r) >> 1;
build(l, mid, id * 2);
build(mid + 1, r, id * 2 + 1);
# | 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... |