Submission #1318240

#TimeUsernameProblemLanguageResultExecution timeMemory
1318240b_esma101811Odašiljači (COCI20_odasiljaci)C++20
42 / 70
3 ms332 KiB
#include <bits/stdc++.h> using namespace std; #define int long long void solve() { vector<int> vt; int n; cin >> n; double a[n + 1]; double b[n + 1]; for(int i = 1; i <= n; i++) { cin >> a[i] >> b[i]; } if(n == 1) { cout << 0.0000000 << endl; return; } double ans = 0; for(int i = 1; i <= n; i++) { double an = 1e18; for(int j = 1; j <= n; j++) { if(i != j) { an = min(an, sqrt((abs(a[i] - a[j]) / 2) * (abs(a[i] - a[j]) / 2) + (abs(b[i] - b[j]) / 2) * (abs(b[j] - b[i]) / 2))); } } ans = max(ans, an); } cout << setprecision(7) << fixed << ans << endl; } signed main(){ int t = 1; //cin >> t; while(t--){ solve(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...