Submission #13335

#TimeUsernameProblemLanguageResultExecution timeMemory
13335ggohGame (IOI14_game)C++98
Compilation error
0 ms0 KiB
#include<cstdio> int w[1501],n,u,v; void initialize(int n); int hasEdge(int u,int v) { if(w[u]==n-2||w[v]==n-2) { return 1; } else { w[u]++; w[v]++; return 0; } } main() { initialize(n); for(int i=0;i<n*(n-1)/2;i++) { hasEdge(u,v); } }

Compilation message (stderr)

game.cpp:17:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
 main()
      ^
/tmp/ccyjUBa2.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccP1PUGw.o:game.cpp:(.text.startup+0x0): first defined here
/tmp/ccP1PUGw.o: In function `main':
game.cpp:(.text.startup+0xb): undefined reference to `initialize(int)'
/tmp/ccyjUBa2.o: In function `main':
grader.cpp:(.text.startup+0x14): undefined reference to `initialize(int)'
collect2: error: ld returned 1 exit status