Submission #795418

#TimeUsernameProblemLanguageResultExecution timeMemory
795418CauchicoTowns (IOI15_towns)C++17
0 / 100
14 ms348 KiB
#include "towns.h" #include <bits/stdc++.h> using namespace std; int hubDistance(int N, int sub) { int n = N; int mx = 0, mxi = -1; for (int i=1;i<N;i++) { int r = getDistance(0,i); if (r>mx) { mx = r; mxi = i; } } for (int i=0;i<n;i++) { int r = getDistance(mxi,i); if (r>mx) { mx = r; mxi = i; } } return mx-1; }

Compilation message (stderr)

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