# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
386290 | model_code | Bodyguard (JOI21_bodyguard) | C++17 | 6497 ms | 1028404 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 <algorithm>
#include <cstddef>
#include <cstdint>
#include <iostream>
#include <limits>
#include <vector>
using usize = std::size_t;
using i64 = std::int64_t;
static constexpr i64 INF = std::numeric_limits<i64>::max() / 2;
void chmax(i64 &a, const i64 &b) { a = std::max(a, b); }
struct compress {
std::vector<i64> v;
compress() {}
void add(i64 x) { v.push_back(x); }
void build() {
std::sort(v.begin(), v.end());
v.erase(std::unique(v.begin(), v.end()), v.end());
}
i64 operator[](usize i) { return v[i]; }
usize get(i64 x) {
return std::lower_bound(v.begin(), v.end(), x) - v.begin();
}
usize size() { return v.size(); }
};
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |