/in/foo.cc: In function 'void build(int, int, int)':
/in/foo.cc:23:2: error: reference to 'next' is ambiguous
next[tot] = head[f];
^~~~
/in/foo.cc:14:16: note: candidates are: int next [200100]
int head[MAXN],next[MAXN << 1],tot,minx[MAXN][30];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc: In function 'void merge(int, int)':
/in/foo.cc:33:5: error: reference to 'rank' is ambiguous
if(rank[a] < rank[b])swap(a,b);
^~~~
/in/foo.cc:13:14: note: candidates are: int rank [100050]
int fa[MAXN],rank[MAXN];
^~~~
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:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:33:15: error: reference to 'rank' is ambiguous
if(rank[a] < rank[b])swap(a,b);
^~~~
/in/foo.cc:13:14: note: candidates are: int rank [100050]
int fa[MAXN],rank[MAXN];
^~~~
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:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:35:5: error: reference to 'rank' is ambiguous
if(rank[a] == rank[b])rank[a] ++;
^~~~
/in/foo.cc:13:14: note: candidates are: int rank [100050]
int fa[MAXN],rank[MAXN];
^~~~
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:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:35:16: error: reference to 'rank' is ambiguous
if(rank[a] == rank[b])rank[a] ++;
^~~~
/in/foo.cc:13:14: note: candidates are: int rank [100050]
int fa[MAXN],rank[MAXN];
^~~~
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:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:35:24: error: reference to 'rank' is ambiguous
if(rank[a] == rank[b])rank[a] ++;
^~~~
/in/foo.cc:13:14: note: candidates are: int rank [100050]
int fa[MAXN],rank[MAXN];
^~~~
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:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc: In function 'void dfs(int, int)':
/in/foo.cc:46:34: error: reference to 'next' is ambiguous
for(int i = head[u];i != -1;i = next[i]){
^~~~
/in/foo.cc:14:16: note: candidates are: int next [200100]
int head[MAXN],next[MAXN << 1],tot,minx[MAXN][30];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:96:7: warning: unused variable 'lca' [-Wunused-variable]
int lca = LCA(a,b);
^~~