# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
473840 | Ahmed_Solyman | Odašiljači (COCI20_odasiljaci) | C++14 | 7 ms | 304 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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=4e18;
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(10)<<ans;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |