Submission #473840

# Submission time Handle Problem Language Result Execution time Memory
473840 2021-09-16T10:22:32 Z Ahmed_Solyman Odašiljači (COCI20_odasiljaci) C++14
42 / 70
7 ms 304 KB
#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
1 Correct 0 ms 204 KB Output is correct
2 Incorrect 1 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 3 ms 204 KB Output is correct
8 Incorrect 4 ms 300 KB Output isn't correct
9 Incorrect 7 ms 204 KB Output isn't correct
10 Correct 7 ms 304 KB Output is correct