#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define creeper_bonc ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pb push_back
#define fi first
#define se second
#define pii pair<int, int>
#define all(v) (v).begin(), (v).end()
#define ins insert
#define nl endl
#define int long long
const int imax = INT_MAX;
const int imin = INT_MIN;
void _()
{
int n; cin>>n;
double x[1000], y[1000];
for(int i = 0;i < n;i++) cin>>x[i]>>y[i];
double mn[1000];
bool vis[1000];
for(int i = 0;i < n;i++) mn[i] = imax, vis[i] = 0;
double mx = 0;
mn[0] = 0;
for(int i = 0;i < n;i++)
{
int u = -1;
for(int j = 0;j < n;j++)
{
if(!vis[j] and (u == -1 or mn[j] < mn[u])) u = j;
}
vis[u] = 1;
mx = max(mx, mn[u]);
for(int j = 0;j < n;j++)
{
if(!vis[j]) mn[j] = min(mn[j], sqrt(pow(x[u] - x[j], 2) + pow(y[u] - y[j], 2)));
}
}
cout<<fixed<<setprecision(7)<<mx / 2.0;
}
signed main()
{
creeper_bonc
int t=1;
//cin>>t;
while(t--) {
_();
cout<<endl;}
}
/*Author: Davud*/
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |