Submission #432465

#TimeUsernameProblemLanguageResultExecution timeMemory
432465MilosMilutinovicGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 1505; int parent[MAXN]; int root(int u) { return parent[u] ^ u ? parent[u] = root(parent[u]) : u; } void unite(int u, int v) { u = root(u); v = root(v); parent[u] = v; } void hasEdge(int u, int v); void initialize(int N) { for (int i = 0; i < N; i++) parent[i] = i; for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) if (root(i) != root(j)) if (hasEdge(i, j)) unite(i, j); }

Compilation message (stderr)

game.cpp:19:6: error: ambiguating new declaration of 'void hasEdge(int, int)'
   19 | void hasEdge(int u, int v);
      |      ^~~~~~~
In file included from game.cpp:1:
game.h:5:5: note: old declaration 'int hasEdge(int, int)'
    5 | int hasEdge(int u, int v);
      |     ^~~~~~~