# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
219411 | maruii | Treatment Project (JOI20_treatment) | C++14 | 3083 ms | 3188 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;
using ll = long long;
using pii = pair<int, int>;
using tii = array<int, 3>;
using pil = pair<int, ll>;
#define ff first
#define ss second
#define eack emplace_back
#define all(x) (x).begin(), (x).end()
const ll INF = 1e18;
int N, M;
map<int, vector<pair<pii, int>>> MP;
using abc = pair<ll, tii>;
abc in[100005];
priority_queue<abc, vector<abc>, greater<abc>> pq;
map<tii, ll> dist;
bool chk(tii a, tii b) {
if (a[0] > b[0]) swap(a, b);
int l = b[1] - 1, r = b[2] + 1;
int s = a[1], e = a[2];
if (s > 1) s += b[0] - a[0];
if (e < N) e -= b[0] - a[0];
return l <= e && s <= r;
}
tii f(tii a, tii b) {
# | 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... |