# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
164410 | dolphingarlic | Park (BOI16_park) | C++14 | 765 ms | 54708 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>
#define FOR(i, x, y) for (ll i = x; i < y; i++)
#define x first
#define y second
typedef long long ll;
using namespace std;
ll cmp[2004];
ll find(ll a) {
while (cmp[a] != a) cmp[a] = cmp[cmp[a]], a = cmp[a];
return a;
}
void onion(ll a, ll b) { cmp[find(a)] = cmp[find(b)]; }
pair<pair<ll, ll>, ll> tree[2000], visitors[100000];
priority_queue<pair<double, pair<ll, ll>>> pq;
string ans[100000];
ll dist(pair<ll, ll> a, pair<ll, ll> b) {
return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
ll n, m, w, h;
cin >> n >> m >> w >> h;
FOR(i, 0, n + 4) cmp[i] = i;
FOR(i, 0, n) {
cin >> tree[i].x.x >> tree[i].x.y >> tree[i].y;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |