# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
259098 | patrikpavic2 | Two Antennas (JOI19_antennas) | C++17 | 782 ms | 41080 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 <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#define X first
#define Y second
#define PB push_back
using namespace std;
typedef pair < int, int > pii;
const int OFF = (1 << 18);
const int N = 2e5 + 500;
pii T[2 * OFF], P[2 * OFF], NULA = {-1, -1};
int sol[2 * OFF], uklj[2 * OFF], L[N], R[N], A[N], B[N], H[N], ans[N], n, q;
vector < int > Q[N], prom[N];
inline pii spoji_par(pii A, pii B){
if(A == NULA) return B;
if(B == NULA) return A;
return {min(A.X, B.X), max(A.Y, B.Y)};
}
void refresh(int x){
if(P[x] == NULA) return;
if(T[x] != NULA){
sol[x] = max(sol[x], max(T[x].Y - P[x].X, P[x].Y - T[x].X));
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... |