# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
168161 | AlexPop28 | Triple Jump (JOI19_jumps) | C++11 | 1531 ms | 101088 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>
#define dbg() cerr <<
#define name(x) (#x) << ": " << (x) << ' ' <<
// dupa 7 ore printre care 3 de somn in care ma tot gandeam de ce luasem
// RTE, am ajuns la concluzia ca e din cauza stupizeniei de windows...
using namespace std;
struct SegmTree {
struct Node {
int maxv, val, lazy;
Node(int maxv_ = 0, int val_ = 0, int lazy_ = 0) :
maxv(maxv_), val(val_), lazy(lazy_) {}
// maxv = val max on [l, r] in v
// val = maximum val of jumps in [l, r]
// lazy = max val to update children with
};
int n;
vector<int> v;
vector<Node> tree;
SegmTree(const vector<int> v_) : n(v_.size()), v(v_), tree(4 * n) {
Build(0, 0, n - 1);
}
void Recalc(int node) {
tree[node].val = max(tree[2 * node + 1].val, tree[2 * node + 2].val);
}
void Build(int node, int left, int right) {
if (left == right) {
tree[node].maxv = v[left];
tree[node].val = v[left];
# | 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... |