#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define BET(a,b,c) ((a)<=(b)&&(b)<(c)) #define FOR(i,n) for(int i=0,i##_end=(int(n));i VI; typedef vector VVI; long double dist(long long x, long long y){ long long D = x * x + y * y; long long sD = sqrt(D); double eps = 0; if(sD * sD != D) eps += 1e-3; return sqrt(D) + eps; } long long adjust(long double x){ //printf("%.10Lf\n", x); long long v = (long long)(x + 1e-3); long long w = v / 10; if(x > v + (1e-4)) w++; return w * 10; } struct DisjointSet { vector group ; DisjointSet(int n) : group(n, -1) { ; } bool unionSet(int x, int y) { x = root(x); y = root(y); if (x != y) { if (group[y] > group[x]) swap(x, y); group[x] += group[y]; group[y] = x; } return x != y; } bool is_sameSet(int x, int y) { return root(x) == root(y); } int root(int x) { return group[x] < 0 ? x : group[x] = root(group[x]); } int size(int x) { return -group[root(x)]; } }; int main() { int N; cin>>N; vector X(N); vector Y(N); FOR(i,N) cin>>X[i]>>Y[i]; double ans = -1e100; vector > > edges; FOR(i,N){ FOR(j,i) edges.push_back(MP(dist(X[i]-X[j],Y[i]-Y[j]), MP(i,j))); } sort(ALL(edges)); DisjointSet D(N); for(const auto &e : edges){ if(D.unionSet(e.second.first, e.second.second)){ ans = e.first; if(D.is_sameSet(0, N-1)) break; } } printf("%lld\n", adjust(ans)); return 0; }