/in/foo.cc: In function 'void init()':
/in/foo.cc:38:9: error: reference to 'rank' is ambiguous
rank[i]=0;
^~~~
/in/foo.cc:31:5: note: candidates are: int rank [200010]
int rank[2*MAXN]; /*rank[x]是x的高度的一个上界*/
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/nested_exception.h:40,
from /usr/include/c++/6/exception:173,
from /usr/include/c++/6/ios:39,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:7:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc: In function 'void unite(int, int)':
/in/foo.cc:54:8: error: reference to 'rank' is ambiguous
if(rank[x] < rank[y])/*让rank比较高的作为父结点*/
^~~~
/in/foo.cc:31:5: note: candidates are: int rank [200010]
int rank[2*MAXN]; /*rank[x]是x的高度的一个上界*/
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/nested_exception.h:40,
from /usr/include/c++/6/exception:173,
from /usr/include/c++/6/ios:39,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:7:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:54:18: error: reference to 'rank' is ambiguous
if(rank[x] < rank[y])/*让rank比较高的作为父结点*/
^~~~
/in/foo.cc:31:5: note: candidates are: int rank [200010]
int rank[2*MAXN]; /*rank[x]是x的高度的一个上界*/
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/nested_exception.h:40,
from /usr/include/c++/6/exception:173,
from /usr/include/c++/6/ios:39,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:7:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:59:12: error: reference to 'rank' is ambiguous
if(rank[x] == rank[y])rank[x]++;
^~~~
/in/foo.cc:31:5: note: candidates are: int rank [200010]
int rank[2*MAXN]; /*rank[x]是x的高度的一个上界*/
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/nested_exception.h:40,
from /usr/include/c++/6/exception:173,
from /usr/include/c++/6/ios:39,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:7:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:59:23: error: reference to 'rank' is ambiguous
if(rank[x] == rank[y])rank[x]++;
^~~~
/in/foo.cc:31:5: note: candidates are: int rank [200010]
int rank[2*MAXN]; /*rank[x]是x的高度的一个上界*/
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/nested_exception.h:40,
from /usr/include/c++/6/exception:173,
from /usr/include/c++/6/ios:39,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:7:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:59:31: error: reference to 'rank' is ambiguous
if(rank[x] == rank[y])rank[x]++;
^~~~
/in/foo.cc:31:5: note: candidates are: int rank [200010]
int rank[2*MAXN]; /*rank[x]是x的高度的一个上界*/
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/nested_exception.h:40,
from /usr/include/c++/6/exception:173,
from /usr/include/c++/6/ios:39,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:7:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~