# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
505122 | tengiz05 | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 2146 ms | 51456 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 "bubblesort2.h"
#include <bits/stdc++.h>
constexpr int inf = 1E9;
struct Info {
int x;
Info(int x = -inf) : x(x) {}
};
Info operator+(const Info &a, const Info &b) {
return Info(std::max(a.x, b.x));
}
struct Tag {
int add;
Tag(int add = 0) : add(add) {}
};
void apply(Tag &a, const Tag &b) {
a.add += b.add;
}
void apply(Info &a, const Tag &b) {
a.x += b.add;
}
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... |