Submission #1079202

#TimeUsernameProblemLanguageResultExecution timeMemory
1079202hirayuu_ojGame (IOI13_game)C++17
Compilation error
0 ms0 KiB
#include "game.h" vector<int> cnt; void initialize(int n){ cnt.resize(n,n-1); } int hasEdge(int u, int v){ cnt[u]--;cnt[v]--; if(cnt[u]==0||cnt[v]==0)return 1; else return 0; }

Compilation message (stderr)

game.cpp:2:1: error: 'vector' does not name a type
    2 | vector<int> cnt;
      | ^~~~~~
game.cpp: In function 'void initialize(int)':
game.cpp:4:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
    4 |     cnt.resize(n,n-1);
      |     ^~~
      |     int
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:7:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
    7 |     cnt[u]--;cnt[v]--;
      |     ^~~
      |     int
game.cpp:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^