#include "bits/stdc++.h" #define REP(i, n, N) for(ll i=(n); i<(N); i++) #define RREP(i, n, N) for(ll i=(N-1); i>=(n); i--) #define LREP(lst,itr) for(auto itr = lst.begin(); itr != lst.end(); ++itr) #define CK(n, a, b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define MCP(a, b) memcpy(b,a,sizeof(b)) #define P(s) cout<<(s)<> typedef long long ll; using namespace std; const ll MOD = 1e9 + 7; const ll INF = 1e18; struct point_dist{ ll point1; ll point2; ll dist; }; struct points{ ll x; ll y; }; bool cmp(const point_dist& A, const point_dist& B){ return A.dist < B.dist; } ll pow(ll A){ return A*A; } const int MAX_N = 100010; struct UnionFind { int par[MAX_N]; // 親ノードの番号 int deph[MAX_N]; // ノードの深さ UnionFind(int n) { fill(par, par + MAX_N, -1); for (int i = 0; i> n; vector ps(n+1); vector pd; REP(i,1,n+1){ cin >> x >> y; ps[i].x=x; ps[i].y=y; } REP(i,1,n+1){ REP(j,i+1,n+1){ pd.push_back({i,j,pow(abs(ps[i].x-ps[j].x))+pow(abs(ps[i].y-ps[j].y))}); } } /** for(auto item:pd){ P2(item.point1,item.point2); } **/ sort(pd.begin(),pd.end(),cmp); UnionFind uf(n); ll original; for(auto item : pd){ uf.unite(item.point1,item.point2); if(uf.same(1,n)){ original = item.dist; break; } } if(original%100==0){ P(((ll)sqrt(original)/10)*10); }else{ P(((ll)sqrt(original)/10)*10+10); } }