# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
612444 | Jomnoi | Triple Jump (JOI19_jumps) | C++17 | 1127 ms | 91736 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 MAX_N = 5e5 + 5;
const int MAX_Q = 5e5 + 5;
const int INF = 1e9 + 7;
int A[MAX_N];
int L[MAX_Q], R[MAX_Q], ans[MAX_Q];
vector <int> queries[MAX_N], updates[MAX_N];
struct Node {
int ans, maxL, maxR;
Node() {}
Node(int a, int ml, int mr) : ans(a), maxL(ml), maxR(mr) {}
Node operator+(const Node &o) const {
int ans_, maxL_, maxR_;
ans_ = max({ans, o.ans, maxL + o.maxR});
maxL_ = max(maxL, o.maxL);
maxR_ = max(maxR, o.maxR);
return Node(ans_, maxL_, maxR_);
}
}tree[4 * MAX_N];
void build(int idx, int l, int r) {
if(l == r) {
return void(tree[idx] = Node(-INF, -INF, A[l]));
}
# | 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... |