Submission #163478

#TimeUsernameProblemLanguageResultExecution timeMemory
163478GioChkhaidzeGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include "game.h" using namespace std; void initialize(int n) { int a[n+5]; for (int i=0; i<n; i++) a[i]=n-1; } int hasEdge(int u,int v) { if (a[u]==1 || a[v]==1) return 1; a[u]--,a[v]--; return 0; }

Compilation message (stderr)

game.cpp: In function 'void initialize(int)':
game.cpp:4:7: warning: variable 'a' set but not used [-Wunused-but-set-variable]
   int a[n+5];
       ^
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:10:6: error: 'a' was not declared in this scope
  if (a[u]==1 || a[v]==1) return 1;
      ^
game.cpp:11:4: error: 'a' was not declared in this scope
    a[u]--,a[v]--;
    ^