Submission #310393

#TimeUsernameProblemLanguageResultExecution timeMemory
310393aZvezdaTowns (IOI15_towns)C++14
Compilation error
0 ms0 KiB
#include "towns.h" const int MAX_N = 115; int dist0[MAX_N]; int hubDistance(int N, int sub) { int mx = 0; for(int i = 1; i < N; i ++) { dist0[i] = getDistance(0, i); if(dist0[i] > dist0[mx]) { mx = i; } } int R = 0; for(int i = 0; i < N; i ++) if(i != mx) { chkmax(R, getDistance(mx, i)); } return R; }

Compilation message (stderr)

towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:16:9: error: 'chkmax' was not declared in this scope
   16 |         chkmax(R, getDistance(mx, i));
      |         ^~~~~~
towns.cpp:6:28: warning: unused parameter 'sub' [-Wunused-parameter]
    6 | int hubDistance(int N, int sub) {
      |                        ~~~~^~~