제출 #1004601

#제출 시각아이디문제언어결과실행 시간메모리
1004601Gray게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include "game.h" vector<ll> con; ll N; void initialize(int n) { N=n; con.resize(n); } int hasEdge(int u, int v) { if (u>v) swap(u, v); if (con[u]==N-u-1){ return 1; }else{ con[u]++; return 0; } }

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

game.cpp:2:1: error: 'vector' does not name a type
    2 | vector<ll> con;
      | ^~~~~~
game.cpp:3:1: error: 'll' does not name a type
    3 | ll N;
      | ^~
game.cpp: In function 'void initialize(int)':
game.cpp:5:5: error: 'N' was not declared in this scope
    5 |     N=n;
      |     ^
game.cpp:6:5: error: 'con' was not declared in this scope
    6 |     con.resize(n);
      |     ^~~
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:10:14: error: 'swap' was not declared in this scope
   10 |     if (u>v) swap(u, v);
      |              ^~~~
game.cpp:11:9: error: 'con' was not declared in this scope
   11 |     if (con[u]==N-u-1){
      |         ^~~
game.cpp:11:17: error: 'N' was not declared in this scope
   11 |     if (con[u]==N-u-1){
      |                 ^
game.cpp:17:1: warning: control reaches end of non-void function [-Wreturn-type]
   17 | }
      | ^