| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1342277 | mantaggez | Best Place (NOI17_bestplace) | C++20 | 27 ms | 2600 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct point {
ll x, y;
};
ll n;
vector<point> p;
ll dist(point& a, point& b) { return abs(a.x - b.x) + abs(a.y - b.y); }
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin >> n;
for(ll i=0;i<n;i++) {
ll x, y;
cin >> x >> y;
p.push_back({x, y});
}
point ans;
sort(p.begin(), p.end(), [&](point& a, point& b) {
return a.x < b.x;
});
ans.x = p[n / 2].x;
sort(p.begin(), p.end(), [&](point& a, point& b) {
return a.y < b.y;
});
ans.y = p[n / 2].y;
cout << ans.x << ' ' << ans.y << '\n';
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
