| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 587447 | gg123_pe | Best Place (NOI17_bestplace) | C++14 | 1086 ms | 3660 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define f(i,a,b) for(int i = a; i < b; i++)
const int N = 1e5 + 5;
const ll inf = 2e18;
int n;
ll a[N], b[N];
int main(){
cin >> n;
f(i,1,n+1) cin >> a[i] >> b[i];
ll ans = inf, x, y;
f(i,1,n+1){
ll res = 0;
f(j,1,n+1){
res += abs(a[j]-a[i]) + abs(b[j]-b[i]);
}
if(res < ans){
x = a[i], y = b[i];
}
}
cout << x << " " << 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... | ||||
