#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define f first
#define s second
#define pb push_back
#define yes cout << "yes" << endl;
#define YES cout << "YES" << endl;
#define no cout << "no" << endl;
#define NO cout << "NO" << endl;
void never_give_up() {
int n;
cin >> n;
//double d = sqrt(n);
//cout << fixed << setprecision(20) << d / 2 << endl;
vector<pair<int, int>>vt(n + 1);
for(int i = 1;i <= n; i++){
int a, b;
cin >> a >> b;
vt[i] = {a, b};
}
if(n == 1){
cout << 0 << endl;
return;
}
cout << endl;
int ans = 0;
for(int i = 1;i <= n; i++){
int cvb = LLONG_MAX;
for(int j = 1;j <= n; j++){
if(j != i){
int a = abs(vt[i].f - vt[j].f);
int b = abs(vt[i].s - vt[j].s);
a *= a;
b *= b;
//cout << i << " " << j << " : " << a << " " << b << endl;
cvb = min(cvb, a + b);
//cout << cvb << endl;
}
}
//cout << i << " " << cvb << endl;
ans = max(ans, cvb);
/*for(int j = 1;j <= n; j++){
if(j != i){
int a = abs(vt[i].f - vt[j].f);
int b = abs(vt[i].s - vt[j].s);
a *= a;
b *= b;
//cout << i << " " << j << " : " << a << " " << b << endl;
if(a + b == cvb){
}
}
}*/
}
//cout << ans << endl;
double d = sqrt(ans);
cout << fixed << setprecision(20) << d / 2 << endl;
}
void You_can_do_it() {
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int THE_wasd = 1;
//cin >> THE_wasd;
while(THE_wasd--){
never_give_up();
//You_can_do_it();
}
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |