/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 320.0 KiB
#3 Accepted 1ms 324.0 KiB
#4 Wrong Answer 1ms 532.0 KiB
#5 Accepted 1ms 532.0 KiB
#6 Accepted 1ms 532.0 KiB
#7 Accepted 2ms 512.0 KiB
#8 Accepted 1ms 532.0 KiB
#9 Accepted 1ms 324.0 KiB
#10 Accepted 1ms 532.0 KiB
#11 Wrong Answer 1ms 320.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
#define nl '\n'
#define ll long long
const int N = 1e5+5;

ll a[N], b[N];

ll dis(ll x, ll y, ll xx, ll yy){
    return ((x-xx)*(x-xx)+(y-yy)*(y-yy));
}

int main() {
    int n; cin >> n;
    for(int i=0;i<n;++i) cin >> a[i] >> b[i];
    ll d = -1.0;
    for(int i=0;i<n;++i){
        for(int j=0;j<n;++j){
            d = max(d, dis(a[i], b[i], a[j], b[j]));
            // cerr << d << endl;
        }
    }
    double l = 0;
    double r = 1e7;
    double ans = 0;
    int t = 100;
    while(t--){
        double mid = (l+r)/2;
        if(mid*mid<=d) ans = mid, l = mid;
        else r = mid;
    }
    cout << fixed << setprecision(10) << ans / 2.0l<< nl;
}

Information

Submit By
Type
Submission
Problem
P1123 Relic Rescue Radius!
Contest
Sylhet ICPC 2024 Collaborative Challenge: Episode 2
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-30 12:18:48
Judged At
2024-11-11 02:34:40
Judged By
Score
45
Total Time
2ms
Peak Memory
532.0 KiB