# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
505122 | tengiz05 | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 2146 ms | 51456 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |