#include "bits/stdc++.h" using namespace std; #define int long long #define REP(i, n) for(int i=0; i<(n); i++) struct P { int x, y; P(){}; P(int _x, int _y): x(_x), y(_y){}; }; int distance2(P a, P b) { return (int)pow(a.x - b.x, 2) + (int)pow(a.y - b.y, 2); } int N,T; int V[1111][1111]; vector

P(1111); bool isok(int len) { int border = pow(len, 2); queue que; que.push(0); vector checked(N, false); while(que.size()) { int i = que.front(); que.pop(); if (checked[i]) continue; checked[i] = true; REP(j,N) { if (checked[j]) continue; if (V[i][j] <= border) { if (j == N-1) return true; que.push(j); } } } return false; } signed main() { cin >> N; REP(i,N) cin >> P[i].x >> P[i].y; REP(i,N) REP(j,i) { int d = distance2(P[i], P[j]); V[i][j] = V[j][i] = d; } int high = (int)1e9 * 2; int low = 0; while(high - low > 10) { int mid = (high + low) /2; if (isok(mid)) { high = mid; } else { low = mid; } } int len = (low / 10) * 10; REP(i,10) { if (isok(len)) { break; } len += 10; } cout << len << endl; return 0; }