#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
double dist(double x1,double y1,double x2,double y2){
return sqrt(pow(abs(x1-x2),2)+pow(abs(y1-y2),2));
}
int main()
{
ll n;cin>>n;
vector<pair<double,double>>arr(n);
for(auto &i:arr)cin>>i.first>>i.second;
double ans=0;
for(ll i=0;i<n;i++){
double mn=1e18;
for(ll j=0;j<n;j++){
if(i==j)continue;
mn=min(mn,dist(arr[i].first,arr[i].second,arr[j].first,arr[j].second)/2);
}
ans=max(ans,mn);
}
cout<<fixed<<setprecision(7)<<ans;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Incorrect |
2 ms |
204 KB |
Output isn't correct |
7 |
Correct |
2 ms |
204 KB |
Output is correct |
8 |
Incorrect |
4 ms |
204 KB |
Output isn't correct |
9 |
Incorrect |
7 ms |
204 KB |
Output isn't correct |
10 |
Correct |
6 ms |
204 KB |
Output is correct |