game.cpp: In function 'void linkSet(int, int)':
game.cpp:10:6: error: reference to 'rank' is ambiguous
if (rank[x] > rank[y]) {
^
game.cpp:5:14: note: candidates are: int rank [1500]
int p[1500], rank[1500], s[1500];
^
In file included from /usr/include/c++/5/bits/move.h:57:0,
from /usr/include/c++/5/bits/stl_pair.h:59,
from /usr/include/c++/5/bits/stl_algobase.h:64,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from game.cpp:1:
/usr/include/c++/5/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
game.cpp:10:16: error: reference to 'rank' is ambiguous
if (rank[x] > rank[y]) {
^
game.cpp:5:14: note: candidates are: int rank [1500]
int p[1500], rank[1500], s[1500];
^
In file included from /usr/include/c++/5/bits/move.h:57:0,
from /usr/include/c++/5/bits/stl_pair.h:59,
from /usr/include/c++/5/bits/stl_algobase.h:64,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from game.cpp:1:
/usr/include/c++/5/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
game.cpp:20:3: error: reference to 'rank' is ambiguous
rank[y]++;
^
game.cpp:5:14: note: candidates are: int rank [1500]
int p[1500], rank[1500], s[1500];
^
In file included from /usr/include/c++/5/bits/move.h:57:0,
from /usr/include/c++/5/bits/stl_pair.h:59,
from /usr/include/c++/5/bits/stl_algobase.h:64,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from game.cpp:1:
/usr/include/c++/5/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
game.cpp: In function 'void makeSet(int)':
game.cpp:32:32: error: reference to 'rank' is ambiguous
void makeSet(int x) {p[x] = x, rank[x] = 0, s[x] = 1; }
^
game.cpp:5:14: note: candidates are: int rank [1500]
int p[1500], rank[1500], s[1500];
^
In file included from /usr/include/c++/5/bits/move.h:57:0,
from /usr/include/c++/5/bits/stl_pair.h:59,
from /usr/include/c++/5/bits/stl_algobase.h:64,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from game.cpp:1:
/usr/include/c++/5/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^