# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
330948 | jungsnow | Triple Jump (JOI19_jumps) | C++14 | 1367 ms | 136080 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.
///refers to Maripium's code
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int maxn = 500100;
const ll inf = 1e18;
struct sta {
ll pref, ans, suf;
sta() : pref(-inf), ans(-inf), suf(-inf) {}
friend sta operator + (const sta &l, const sta &r) {
sta ans;
ans.pref = max(l.pref, r.pref);
ans.suf = max(l.suf, r.suf);
ans.ans = max({l.ans, r.ans, l.pref + r.suf});
return ans;
}
};
ll A[maxn], Ans[maxn];
sta T[maxn << 2];
vector<pair<int, ll>> es[maxn];
vector<pair<int, int>> qs[maxn];
void build(int v, int l, int r) {
if (l == r) {
T[v].suf = A[l];
return;
# | 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... |