#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];
int vis[1000];
for(int i = 0;i < n;i++)
{
vis[i] = 0;
mn[i] = imax;
}
double mx = 0;
mn[0] = 0;
int u;
for(int i = 0;i < n;i++)
{
u = -1;
for(int j = 0;j < n;j++)
{
if(!vis[j])
{
if(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] == 0) mn[j] = min(sqrt(pow(abs(x[i] - x[j]), 2)) + pow(abs(y[i] - y[j]), 2), mn[j]);
}
}
cout<<fixed<<setprecision(10)<<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... |