Submission #128379

#TimeUsernameProblemLanguageResultExecution timeMemory
128379SoSoodingGame (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include "game.h" #include <bits/stdc++.h> const int N = 1501; int deg[N]; void initialize(int n) { for(int i = 0;i < n;i++)deg[i] = n-1; } int hasEdge(int u, int v) { int mx = max(u, v); deg[u]++; if(deg[u] == u) return 1; return 0; }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:12:14: error: 'max' was not declared in this scope
     int mx = max(u, v);
              ^~~
game.cpp:12:14: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
                 from game.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note:   'std::max'
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
game.cpp:12:9: warning: unused variable 'mx' [-Wunused-variable]
     int mx = max(u, v);
         ^~