제출 #587533

#제출 시각아이디문제언어결과실행 시간메모리
587533benson1029도시들 (IOI15_towns)C++14
0 / 100
24 ms980 KiB
#include "towns.h" #include<bits/stdc++.h> using namespace std; int dis[200][200]; int hubDistance(int N, int sub) { for(int i=0; i<N; i++) { for(int j=i+1; j<N; j++) { dis[i][j] = dis[j][i] = getDistance(i, j); } } int ans = 0; for(int i=0; i<N; i++) { for(int j=i+1; j<N; j++) { for(int k=j+1; k<N; k++) { int sum = (dis[i][j] + dis[j][k] + dis[i][k]) / 2; ans = max(ans, sum - dis[i][j]); ans = max(ans, sum - dis[j][k]); ans = max(ans, sum - dis[i][k]); } } } return ans; }

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

towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:7:28: warning: unused parameter 'sub' [-Wunused-parameter]
    7 | int hubDistance(int N, int sub) {
      |                        ~~~~^~~
#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...