Submission #419334

#TimeUsernameProblemLanguageResultExecution timeMemory
419334MarceantasyGame (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include "game.h" void initialize(int n) { int deg[n]; for(int i = 0; i<n; ++i){ deg[i] = n; } } int hasEdge(int u, int v) { deg[u]--; deg[v]--; if(!deg[u] || !deg[v]){ return 1; } return 0; }

Compilation message (stderr)

game.cpp: In function 'void initialize(int)':
game.cpp:4:9: warning: variable 'deg' set but not used [-Wunused-but-set-variable]
    4 |     int deg[n];
      |         ^~~
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:11:5: error: 'deg' was not declared in this scope
   11 |     deg[u]--;
      |     ^~~