# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
798497 | rnl42 | Two Antennas (JOI19_antennas) | C++14 | 516 ms | 43712 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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;
constexpr int INF = 1e9+42;
struct Antenna {
int h, a, b;
};
struct Query {
int l, r, qid;
bool operator<(const Query& other) const {
return r == other.r ? l < other.l : r < other.r;
}
};
struct nodepos {
int maxfull = -INF, bestheight = +INF;
nodepos() {}
nodepos(int maxfull, int bestheight) : maxfull(maxfull), bestheight(bestheight) {}
void update(nodepos k) {
bestheight = k.bestheight;
}
nodepos merge(const nodepos& other) const {
return nodepos(max(maxfull, other.maxfull), min(bestheight, other.bestheight));
}
void apply(int h) {
maxfull = max(maxfull, h-bestheight);
Compilation message (stderr)
# | 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... |