#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n, x, y;
cin >> n;
vector<pair<int, int>> coords;
for (int i = 0; i < n; i++) {
cin >> x >> y;
coords.push_back({ x, y });
}
double maxdist = -1;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
maxdist = max(maxdist, pow((coords[i].first - coords[j].first) * (coords[i].first - coords[j].first) + (coords[i].second - coords[j].second) * (coords[i].second - coords[j].second), 0.5));
}
}
cout << maxdist / 2 << '\n';
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |