Submission #128495

#TimeUsernameProblemLanguageResultExecution timeMemory
128495antimirageGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include "game.h" #include <bits/stdc++.h> #include "grader.cpp" using namespace std; const int N = 1505; int deg[N], used[N], cnt, n; set <int> g[N]; void initialize(int N) { n = N; for (int i = 1; i <= n; i++) { for (int j = i + 1; j <= n; j++) { g[i].insert(j); g[j].insert(i); } } } void dfs (int v) { used[v] = 1; cnt++; for (auto to : g[v]) { if (used[to]) continue; dfs(to); } } int hasEdge(int u, int v) { u++; v++; assert(g[u].find(v) != g[u].end()); assert(g[v].find(u) != g[v].end()); g[u].erase(v); g[v].erase(u); memset(used, 0, sizeof(used) ); cnt = 0; dfs(1); if (cnt < n) { g[v].insert(u); g[u].insert(v); return 1; } return 0; }

Compilation message (stderr)

/tmp/ccGWgTEn.o: In function `read_int()':
grader.cpp:(.text+0x0): multiple definition of `read_int()'
/tmp/ccCOx6oJ.o:game.cpp:(.text+0x0): first defined here
/tmp/ccGWgTEn.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccCOx6oJ.o:game.cpp:(.text.startup+0x0): first defined here
/tmp/ccGWgTEn.o:(.bss+0x0): multiple definition of `rets'
/tmp/ccCOx6oJ.o:(.bss+0x14980): first defined here
collect2: error: ld returned 1 exit status