#include #include using namespace std; class range {private: struct I{int x;int operator*(){return x;}bool operator!=(I& lhs){return x v(n); for(int i : range(n)) { int x, y; scanf("%d%d", &x, &y); v[i] = Point(x, y); } vector> cost(n, vector(n, 0)), route(n, vector(n, inf)); // for(int i : range(n)) { // route[i][i] = 0; // } for(int i : range(n-1)) { for(int j : range(i+1, n)) { int dd = v[i].distdist(v[j]); cost[i][j] = dd; cost[j][i] = dd; if(dd > 10 * 10) { continue; } route[i][j] = 1; route[j][i] = 1; } } for(int k : range(n)) { for(int i : range(n)) { for(int j : range(n)) { route[i][j] = min(route[i][j], route[i][k] + route[k][j]); } } } int res = 0; for(int i : range(n)) { for(int j : range(i+1, n)) { if(route[i][j] >= inf) { continue; } res = max(res, cost[i][j]); } } printf("%lf\n", sqrt(res) + 1 + (n>0)); return 0; }