# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
502752 | tengiz05 | Triple Jump (JOI19_jumps) | C++17 | 1081 ms | 67752 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 i64 = long long;
struct Info {
int x;
int mx;
Info(int x = 0, int mx = 0) : x(x), mx(std::max(x, mx)) {}
};
Info operator+(const Info &a, const Info b) {
return Info(std::max(a.x, b.x), std::max(a.mx, b.mx));
}
struct Tag {
int x;
Tag(int x = 0) : x(x) {}
};
void apply(Tag &a, const Tag &b) {
a.x = std::max(a.x, b.x);
}
void apply(Info &a, const Tag &b) {
a.mx = std::max(a.mx, a.x + b.x);
}
template<class Info, class Tag,
class Merge = std::plus<Info>>
struct LazySegmentTree {
const int n;
const Merge merge;
std::vector<Info> info;
std::vector<Tag> tag;
LazySegmentTree(int n) : n(n), merge(Merge()), info(4 << std::__lg(n)), tag(4 << std::__lg(n)) {}
# | 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... |