제출 #349785

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3497852021-01-18 12:04:25pit4hTowns (IOI15_towns)C++14
0 / 100
22 ms492 KiB
#include<bits/stdc++.h>
#include "towns.h"
using namespace std;
const int MAXN = 111;
int dist[MAXN][MAXN];
int n, subtask;
int hubDistance(int N, int sub) {
int l = -1, r = -1;
subtask = sub;
n = N;
for(int i=1; i<n; ++i) {
dist[0][i] = getDistance(0, i);
dist[i][0] = dist[0][i];
if(l==-1 || dist[0][i] > dist[0][l]) {
l = i;
}
}
for(int i=0; i<n; ++i) {
if(i==l) continue;
dist[l][i] = getDistance(l, i);
dist[i][l] = dist[l][i];
if(r==-1 || dist[l][i] > dist[l][r]) {
r = i;
}
}
int R = 1e9+1;
for(int i=0; i<n; ++i) {
if(i==l || i==r) continue;
//dist[r][i] = getDistance(r, i);
//dist[i][r] = dist[r][i];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:32:30: warning: unused variable 'd0' [-Wunused-variable]
   32 |   int dl = dist[l][i] - tmp, d0 = dist[0][i] - tmp;
      |                              ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...