제출 #1152254

#제출 시각아이디문제언어결과실행 시간메모리
1152254gelastropodOdašiljači (COCI20_odasiljaci)C++20
0 / 70
17 ms328 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long

signed main() {
	int n, x, y;
	cin >> n;
	vector<pair<int, int>> coords;
	for (int i = 0; i < n; i++) {
		cin >> x >> y;
		coords.push_back({ x, y });
	}
	double maxdist = -1;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			maxdist = max(maxdist, pow((coords[i].first - coords[j].first) * (coords[i].first - coords[j].first) + (coords[i].second - coords[j].second) * (coords[i].second - coords[j].second), 0.5));
		}
	}
	cout << maxdist / 2 << '\n';
}
#Verdict Execution timeMemoryGrader output
Fetching results...