Submission #109878

#TimeUsernameProblemLanguageResultExecution timeMemory
109878dantoh000Game (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "game.h" int ct[1005]; int n; void initialize(int _n) { n = _n; } int hasEdge(int u, int v) { int k = max(u,v); ct[k]++; if (ct[k] == k) return 1; else return 0; }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:9:13: error: 'max' was not declared in this scope
     int k = max(u,v);
             ^~~
game.cpp:9:13: 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:1:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note:   'std::max'
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^~~