/ SeriousOJ /

Record Detail

Wrong Answer


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

Code

#include<bits/stdc++.h>
#define FileIO          freopen("input.in", "r", stdin); freopen("output.in", "w", stdout)
#define ll              long long
#define input_vec(v)    for(int II=0; II<v.size(); II++) cin >> v[II];
#define sortf(v)        sort(v.begin(), v.end());
#define sortr(v)        sort(v.rbegin(), v.rend());
#define print_vec(v)    for(int II=0; II<v.size(); II++){cout << v[II];} cout << endl;

using namespace std;
long double sqr(long double n){return n*n;}
long double dist(pair <long double, long double> a, pair <long double, long double> b){
    return sqr(a.first-b.first)+sqr(a.second-b.second);
}

int main()
{
    
    //if(fopen("input.in", "r")) FileIO;
    int n;
    cin>>n;
    vector <pair<long double, long double>> v(n);
    for(int i=0;i<n;i++){
        long double a, b;
        cin>>a>>b;
        v[i]=make_pair(a, b);
    }
    // for(auto i: v){
    //     cout<<i.first<<" "<<i.second<<endl;
    // }
    long double DIST=-1;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            DIST=max(dist(v[i], v[j]), DIST);
        }
    }

    cout<<fixed<<setprecision(18)<<sqrtl(DIST)/2<<endl;
}

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 10:40:59
Judged At
2024-11-11 02:35:04
Judged By
Score
45
Total Time
1ms
Peak Memory
764.0 KiB