Submission #1004601

#TimeUsernameProblemLanguageResultExecution timeMemory
1004601GrayGame (IOI14_game)C++17
Compilation error
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; } }

Compilation message (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 | }
      | ^