#include #include #include #include #include using namespace std; typedef complex P; namespace std { bool operator < (const P& a, const P& b) { return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b); } } double cross(const P& a, const P& b) { return imag(conj(a)*b); } double dot(const P& a, const P& b) { return real(conj(a)*b); } int ccw(P a, P b, P c) { b -= a; c -= a; if (cross(b, c) > 0) return +1; // counter clockwise if (cross(b, c) < 0) return -1; // clockwise if (dot(b, c) < 0) return +2; // c--a--b on line if (norm(b) < norm(c)) return -2; // a--b--c on line return 0; } vector

convex_hull(vector

ps) { int n = (int)ps.size(), k = 0; sort(ps.begin(), ps.end()); vector

ch(2*n); for (int i = 0; i < n; ch[k++] = ps[i++]) // lower-hull while (k >= 2 && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k; for (int i = n-2, t = k+1; i >= 0; ch[k++] = ps[i--]) // upper-hull while (k >= t && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k; ch.resize(k-1); return ch; } double farthest(const vector

& v) { int n = (int)v.size(); int si = 0, sj = 0; for(int t=0;t v[sj].imag()) sj = t; } double res = 0; int i = si, j = sj; do { res = max(res, abs(v[i]-v[j])); P di = v[(i+1)%n] - v[i]; P dj = v[(j+1)%n] - v[j]; if (cross(di, dj) >= 0) j = (j+1)%n; else i = (i+1)%n; } while(!(i == si && j == sj)); return res; } const int OFFSET = 10000; const int B = 11; int N; int X[122222], Y[122222]; vector bucket[2222][2222]; vector graph[122222]; bool reachable(int i, int j){ int dx = X[i] - X[j]; int dy = Y[i] - Y[j]; return (dx * dx + dy * dy <= 100); } bool used[122222]; double solve(){ double res = 0; for(int i=0;i ps; ps.push_back(P(X[i], Y[i])); queue Q; Q.push(i); used[i] = true; while(!Q.empty()){ int v = Q.front(); Q.pop(); for(int u : graph[v]){ if(used[u])continue; used[u] = true; Q.push(u); ps.push_back(P(X[u], Y[u])); } } if(ps.size() <= 1)continue; if(ps.size() == 2){ res = max(res, abs(ps[0] - ps[1])); continue; } vector

convex = convex_hull(ps); res = max(res, farthest(convex)); } return res + 2; } int main(){ cin >> N; if(N == 0){ cout << 1 << endl; return 0; } for(int i=0;i> X[i] >> Y[i]; X[i] += OFFSET; Y[i] += OFFSET; } for(int i=0;i