제출 #381631

#제출 시각아이디문제언어결과실행 시간메모리
381631ritul_kr_singh게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include "game.h" #include "bits/stdc++.h" using namespace std; vector<int> e; void initialize(int N){ n = N; e.assign(n+1, 1); } int hasEdge(int u, int v){ ++e[u], ++e[v]; return (e[u]==n or e[v]==n); }

컴파일 시 표준 에러 (stderr) 메시지

game.cpp: In function 'void initialize(int)':
game.cpp:8:2: error: 'n' was not declared in this scope
    8 |  n = N;
      |  ^
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:14:16: error: 'n' was not declared in this scope
   14 |  return (e[u]==n or e[v]==n);
      |                ^