# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
935560 | Faissel | Odašiljači (COCI20_odasiljaci) | C++17 | 14 ms | 600 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;
#define ll long long
#define endl '\n'
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;cin >> n;
vector<pair<int,int>>v;
for(int i=0;i<n;i++){
int x,y;cin >> x >> y;
v.push_back({x,y});
}
sort(v.begin(),v.end());
long double maxx = -1e9;
for(int i=0;i<v.size();i++){
long double minx = 1e9;
for(int j=0;j<v.size();j++){
int x = abs(v[i].first - v[j].first) * abs(v[i].first - v[j].first);
int y = abs(v[i].second - v[j].second) * abs(v[i].second - v[j].second);
if(sqrt(x + y) > 0)
minx = min(minx,(long double)sqrt(x+y));
}
maxx = max(maxx,(long double)minx);
}
cout << fixed << setprecision(10) << (maxx/2) << endl;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |