Submission #67169

#TimeUsernameProblemLanguageResultExecution timeMemory
67169MKopchevGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "game.h" const int nmax=1.5e3+42; int target[nmax]; void initialize(int n) { for(int i=0;i<n;i++) target[i]=n-i-1; } int hasEdge(int u,int v) { int e=min(u,v); target[e]--; if(target[e]==0)return 1; return 0; }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:12:11: error: 'min' was not declared in this scope
     int e=min(u,v);
           ^~~
game.cpp:12:11: 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:3456:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^~~