#include #include #include #include #include struct UnionFind { std::vector par, sz; int gnum; explicit UnionFind(int n) : par(n), sz(n, 1), gnum(n) { std::iota(par.begin(), par.end(), 0); } int find(int v) { return (par[v] == v) ? v : (par[v] = find(par[v])); } void unite(int u, int v) { u = find(u), v = find(v); if (u == v) return; if (sz[u] < sz[v]) std::swap(u, v); sz[u] += sz[v]; par[v] = u; --gnum; } bool same(int u, int v) { return find(u) == find(v); } bool ispar(int v) { return v == find(v); } int size(int v) { return sz[find(v)]; } }; using lint = long long; lint dist(lint x, lint y) { return x * x + y * y; } void solve() { int n; std::cin >> n; std::vector> ps(n); for (auto& [x, y] : ps) std::cin >> x >> y; std::vector> es; for (int i = 0; i < n; ++i) { auto [lx, ly] = ps[i]; for (int j = 0; j < i; ++j) { auto [rx, ry] = ps[j]; es.emplace_back(dist(rx - lx, ry - ly), i, j); } } std::sort(es.begin(), es.end()); UnionFind uf(n); lint cost = 0; for (auto [c, u, v] : es) { if (uf.same(u, v)) continue; cost = std::max(cost, c); uf.unite(u, v); if (uf.same(0, n - 1)) break; } lint ok = 200000000, ng = 0; while (ok - ng > 1) { auto mid = (ok + ng) / 2; if (mid * mid * 100 >= cost) { ok = mid; } else { ng = mid; } } std::cout << ok * 10 << "\n"; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }