# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
252964 | islingr | Drzava (COCI15_drzava) | C++14 | 0 ms | 0 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 = int64_t;
#define rep(i, a, b) for (auto i = (a); i < (b); ++i)
#define trav(x, v) for (auto &x : v)
#define pb(x) push_back(x)
#define lb(x...) lower_bound(x)
#define x first
#define y second
const int N = 1 << 16, K = 1 << 6;
const ll inf = 2e8;
using pii = pair<int, int>;
ll norm(const pii &p, const pii &q) {
return (ll) (p.x - q.x) * (p.x - q.x) + (ll) (p.y - q.y) * (p.y - q.y);
}
pair<pii, short> tmp[N];
pii p(int i) { return tmp[i].x; }
bool vis[N]; vector<int> g[N]; vector<short> cmp;
void dfs(int u) {
vis[u] = 1; cmp.pb(tmp[u].y);
for (int v : g[u]) if (!vis[v]) dfs(v);
}
int n; short k;