# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
132402 | 2019-07-18T19:35:55 Z | reda | 도시들 (IOI15_towns) | C++14 | 21 ms | 1016 KB |
#include <bits/stdc++.h> #include "towns.h" using namespace std; int hubDistance( int n, int sub ) { int m[n][n], s, t, maxd = -1; for(int i = 0; i < n; i++) { m[i][i] = 0; for( int j = i+1; j < n; j++ ) { m[i][j] = getDistance(i,j); m[j][i] = m[i][j]; if( m[i][j] > maxd ) { s = i; t = j; maxd = m[i][j]; } } } int R = 1e9+1; for(int i = 0; i < n; ++i ) { if(i==s || i==t)continue ; int z = (m[i][t] - m[i][s] - maxd)/-2; int x = maxd - z; int y = m[i][s] - z; R = min(R, max(x, z)); } return R; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 20 ms | 1016 KB | Output is correct |
2 | Correct | 17 ms | 1016 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 21 ms | 892 KB | Output is correct |
5 | Correct | 21 ms | 888 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 380 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 16 ms | 888 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |