# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
536295 | cadmiumsky | Triple Jump (JOI19_jumps) | C++14 | 1564 ms | 68012 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 nmax = 5e5 + 5;
const int nextpow = 1 << 20;
const int inf = 1e9;
int n;
vector<int> v;
namespace AINT {
struct Node {
int vab, x, sum;
Node operator +(const Node& a) const {
return Node{-inf, max(x, a.x), max(sum, a.sum)};
}
void tag(const int& a) {
if(vab < a)
vab = a, sum = max(sum, a + x);
}
} aint[nmax * 4], iden = Node{-inf, -inf, -inf};
int lazy[nmax * 4];
void apply(int node, int cl, int cr) {
if(lazy[node] == -1)
return;
aint[node].tag(lazy[node]);
if(cl != cr) {
lazy[2 * node] = max(lazy[node], lazy[2 * node]);
lazy[2 * node + 1] = max(lazy[node], lazy[2 * node + 1]);
}
Compilation message (stderr)
# | 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... |