foo.cpp: In function 'void init(int)':
foo.cpp:9:9: error: reference to 'rank' is ambiguous
rank[i]=0;
^
foo.cpp:4:15: note: candidates are: int rank [5005]
int par[5005],rank[5005];
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\move.h:57:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_pair.h:59,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:64,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^
foo.cpp: In function 'void unite(int, int)':
foo.cpp:22:8: error: reference to 'rank' is ambiguous
if(rank[a]<rank[b]) par[a]=b;
^
foo.cpp:4:15: note: candidates are: int rank [5005]
int par[5005],rank[5005];
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\move.h:57:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_pair.h:59,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:64,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^
foo.cpp:22:16: error: reference to 'rank' is ambiguous
if(rank[a]<rank[b]) par[a]=b;
^
foo.cpp:4:15: note: candidates are: int rank [5005]
int par[5005],rank[5005];
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\move.h:57:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_pair.h:59,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:64,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^
foo.cpp:25:12: error: reference to 'rank' is ambiguous
if(rank[a]==rank[b]) rank[a]++;
^
foo.cpp:4:15: note: candidates are: int rank [5005]
int par[5005],rank[5005];
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\move.h:57:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_pair.h:59,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:64,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^
foo.cpp:25:21: error: reference to 'rank' is ambiguous
if(rank[a]==rank[b]) rank[a]++;
^
foo.cpp:4:1