/in/foo.cc: In function 'void prepare()':
/in/foo.cc:28:25: error: reference to 'rank' is ambiguous
for (int i=1;i<=n;i++) rank[i]=lower_bound(lisan+1,lisan+1+n,hei[i])-lisan,id[rank[i]]=i;
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:28:80: error: reference to 'rank' is ambiguous
for (int i=1;i<=n;i++) rank[i]=lower_bound(lisan+1,lisan+1+n,hei[i])-lisan,id[rank[i]]=i;
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:34:26: error: reference to 'rank' is ambiguous
if (fabs((x=hei[id[suc[rank[i]]]])-hei[i])<fabs((y=hei[id[pre[rank[i]]]])-hei[i]))
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:34:65: error: reference to 'rank' is ambiguous
if (fabs((x=hei[id[suc[rank[i]]]])-hei[i])<fabs((y=hei[id[pre[rank[i]]]])-hei[i]))
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:36:18: error: reference to 'rank' is ambiguous
zui[i]=id[suc[rank[i]]];
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:38:31: error: reference to 'rank' is ambiguous
if (fabs((x=hei[id[suc[suc[rank[i]]]]])-hei[i])<fabs(y-hei[i]))
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:40:22: error: reference to 'rank' is ambiguous
ci[i]=id[suc[suc[rank[i]]]];
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:45:18: error: reference to 'rank' is ambiguous
ci[i]=id[pre[rank[i]]];
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:51:18: error: reference to 'rank' is ambiguous
zui[i]=id[pre[rank[i]]];
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:53:46: error: reference to 'rank' is ambiguous
if (fabs(x-hei[i])<fabs((y=hei[id[pre[pre[rank[i]]]]])-hei[i]))
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];
^~~~
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:5:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:55:18: error: reference to 'rank' is ambiguous
ci[i]=id[suc[rank[i]]];
^~~~
/in/foo.cc:19:67: note: candidates are: int rank [100011]
int pre[maxn],suc[maxn],zui[maxn],zuilu[maxn],ci[maxn],cilu[maxn],rank[maxn],lisan[maxn],id[maxn];