#include #include using namespace std; bool check[1000]; int Xs[1000], Ys[1000]; int N; class Pos { public: int x; int y; Pos(int x, int y) { this->x = x; this->y = y; } int distance(Pos pos) { return (x - pos.x) * (x - pos.x) + (y - pos.y) * (y - pos.y); } }; void foo(int index, Pos now, Pos &pos1, Pos &pos2, Pos &pos3, Pos &pos4) { for (int i = 0; i < N; i++) { if (check[i]) { continue; } int x = Xs[i]; int y = Ys[i]; int distance = (x - now.x) * (x - now.x) + (y - now.y) * (y - now.y); if (distance <= 100) { check[i] = true; if(pos1.x > x && pos1.y > y) { pos1.x = x; pos1.y = y; } if(pos2.x > x && pos2.y < y) { pos2.x = x; pos2.y = y; } if(pos3.x < x && pos3.y > y) { pos3.x = x; pos3.y = y; } if(pos4.x < x && pos4.y < y) { pos4.x = x; pos4.y = y; } foo(i, Pos(x, y), pos1, pos2, pos3, pos4); } } } int main() { cin >> N; for (int i = 0; i < N; i++) { check[i] = false; } int ans = 0; for (int i = 0; i < N; i++) { cin >> Xs[i] >> Ys[i]; } for (int i = 0; i < N; i++) { if (check[i]) { continue; } Pos pos1 = Pos(Xs[i], Ys[i]); Pos pos2 = Pos(Xs[i], Ys[i]); Pos pos3 = Pos(Xs[i], Ys[i]); Pos pos4 = Pos(Xs[i], Ys[i]); foo(i, Pos(Xs[i], Ys[i]), pos1, pos2, pos3, pos4); int a[] = {ans, pos1.distance(pos2), pos1.distance(pos3), pos1.distance(pos4), pos2.distance(pos3), pos2.distance(pos4), pos3.distance(pos4)}; int tmp = 0; for (auto b : a) { if (b > tmp) { tmp = b; } } ans = tmp; } cout << sqrt(ans) + 2 << endl; return 0; }