Submission #1152256

#TimeUsernameProblemLanguageResultExecution timeMemory
1152256WongYiKaiOdašiljači (COCI20_odasiljaci)C++20
0 / 70
1 ms400 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	
	ll n;
    cin >> n;
    vector<pair<ll,ll>> v;
    for (int i=0;i<n;i++){
        ll x,y;
        cin >> x >> y;
        v.push_back({x,y});
    }
    double high = 1000000000000;
    for (int i=0;i<n;i++){
        for (int j=i+1;j<n;j++){
            ll x1=v[i].first, y1 = v[i].second, x2 = v[j].first, y2 = v[j].second;
            double dist = (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
            high = min(high,dist);
        }
    }

    cout << sqrt(high)/2;
}
#Verdict Execution timeMemoryGrader output
Fetching results...