Submission #210864

#TimeUsernameProblemLanguageResultExecution timeMemory
210864mohamedsobhi777Game (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include "game.h" using namespace std ; const int N = 1500 + 1 ; int prv[N][N] ; int rem[N]; void initialize(int n) { for(int i = 0 ; i < n ;i++) rem[i] = n-1 ; } int hasEdge(int u, int v) { if(prv[u][v])return prv[u][v] -1 ; rem[u] = max(rem[u]-1 , 0) ; rem[v] = max(rem[v]-1 , 0) ; int ret = ((!rem[u])|(!rem[v])) ; prv[u][v] = prv[v][u] = ret+1 ; return ret; }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:17:14: error: 'max' was not declared in this scope
     rem[u] = max(rem[u]-1 , 0) ; 
              ^~~