제출 #332028

#제출 시각아이디문제언어결과실행 시간메모리
332028zggf게임 (IOI14_game)C++14
컴파일 에러
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; }

컴파일 시 표준 에러 (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]--;
      |         ^~~