# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
781685 | vjudge1 | 도시들 (IOI15_towns) | C++17 | 28 ms | 872 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "towns.h"
#include <bits/stdc++.h>
using namespace std;
#define sp " "
#define endl "\n"
#define pii pair<int, int>
#define ft first
#define nd second
#define pb push_back
const int INF = 1e9 + 7;
int hubDistance(int N, int sub) {
int dist[N][N];
for (int i = 0; i < N; i++){
dist[i][i] = 0;
for (int j = i + 1; j < N; j++){
dist[i][j] = dist[j][i] = getDistance(i, j);
}
}
int ans = INF;
for (int i = 0; i < N; i++){
for (int j = i + 1; j < N; j++){
int d1 = (dist[1][i] - dist[1][j] + dist[i][j]) / 2;
int d2 = dist[i][j] - d1;
int curr = max(d1, d2);
for (int k = 0; k < N; k++){
int x1 = dist[k][i] - d1, x2 = dist[k][j] - d2;
curr = max(curr, max(x1, x2));
}
//cout<<i<<sp<<j<<sp<<curr<<endl;
ans = min(ans, curr);
}
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |