# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
397727 | timmyfeng | Triple Jump (JOI19_jumps) | C++17 | 2115 ms | 147880 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 = 500000;
struct segtree {
segtree *left, *right;
int first, second, maxi;
void apply(int x) {
first = max(first, x);
maxi = max(maxi, first + second);
}
void push() {
left->apply(first);
right->apply(first);
}
void pull() {
second = max(left->second, right->second);
maxi = max({maxi, left->maxi, right->maxi});
}
segtree(int l, int r, int *a) {
first = maxi = INT_MIN;
if (l == r) {
second = a[l];
maxi = first + second;
} else {
# | 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... |