#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll n;
cin >> n;
vector<pair<ll,ll>> v;
for (int i=0;i<n;i++){
ll x,y;
cin >> x >> y;
v.push_back({x,y});
}
double high = 1000000000000;
for (int i=0;i<n;i++){
for (int j=i+1;j<n;j++){
ll x1=v[i].first, y1 = v[i].second, x2 = v[j].first, y2 = v[j].second;
double dist = (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
high = min(high,dist);
}
}
cout << sqrt(high)/2;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |