# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
579281 | lumibons | Two Antennas (JOI19_antennas) | C++17 | 905 ms | 42244 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 namespace std;
const int inf = 1e9 + 1;
struct sdata {
int minhl = inf, maxhl = -inf, maxcost = -1;
};
struct operation {
int minhr = inf, maxhr = -inf;
};
sdata combine(sdata dl, sdata dr) {
return { min(dl.minhl, dr.minhl), max(dl.maxhl, dr.maxhl), max(dl.maxcost, dr.maxcost) };
}
sdata calculate(operation o, sdata d) {
return { d.minhl, d.maxhl, max(d.maxcost, max(o.maxhr - d.minhl, d.maxhl - o.minhr)) };
}
operation merge(operation ot, operation ob) {
return { min(ot.minhr, ob.minhr), max(ot.maxhr, ob.maxhr) };
}
const int sn = 1 << 18;
sdata s[2 * sn];
operation o[sn];
# | 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... |