Submission #332028

#TimeUsernameProblemLanguageResultExecution timeMemory
332028zggfGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include "game.h" vector<int> tab; void initialize(int n) { tab.resize(n+1, n-1); } int hasEdge(int u, int v) { tab[u]--; tab[v]--; if(tab[u]==0||tab[v]==0) {tab[u]=-1; tab[v]=-1; return 1;} return 0; }

Compilation message (stderr)

game.cpp:2:1: error: 'vector' does not name a type
    2 | vector<int> tab;
      | ^~~~~~
game.cpp: In function 'void initialize(int)':
game.cpp:4:5: error: 'tab' was not declared in this scope
    4 |     tab.resize(n+1, n-1);
      |     ^~~
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:8:9: error: 'tab' was not declared in this scope
    8 |         tab[u]--;
      |         ^~~