/in/foo.cc: In function 'void dfs2(int, int)':
/in/foo.cc:37:22: error: reference to 'rank' is ambiguous
top[x]=t,l[x]=++tot,rank[tot]=x;
^~~~
/in/foo.cc:10:22: note: candidates are: int rank [110000]
int son[N],l[N],r[N],rank[N],tot,n;
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/stl_pair.h:59,
from /usr/include/c++/6/utility:70,
from /usr/include/c++/6/algorithm:60,
from /in/foo.cc:3:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~