Submission #383662

#TimeUsernameProblemLanguageResultExecution timeMemory
383662moratoTowns (IOI15_towns)C++17
0 / 100
23 ms1260 KiB
#include "towns.h" #include <bits/stdc++.h> using namespace std; int hubDistance(int N, int sub) { int mx = 0, cara = 0; for (int i = 1; i <= N; i++) { int dist = getDistance(1, i); if (dist > mx) { mx = dist; cara = i; } } mx = 0; for (int i = 1; i <= N; i++) { mx = max(mx, getDistance(cara, i)); } return mx / 2; }

Compilation message (stderr)

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