foo.cpp: In function 'void work()':
foo.cpp:109:3: error: reference to 'rank' is ambiguous
rank[i]=i;
^
foo.cpp:75:35: note: candidates are: int rank [100100]
int n,x0,m,s,x,h[N],pre[N],nxt[N],rank[N];
^
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++\utility:70,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:60,
from foo.cpp:5:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^
foo.cpp:111:7: error: reference to 'rank' is ambiguous
sort(rank+1,rank+1+n,icmp);
^
foo.cpp:75:35: note: candidates are: int rank [100100]
int n,x0,m,s,x,h[N],pre[N],nxt[N],rank[N];
^
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++\utility:70,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:60,
from foo.cpp:5:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^
foo.cpp:111:14: error: reference to 'rank' is ambiguous
sort(rank+1,rank+1+n,icmp);
^
foo.cpp:75:35: note: candidates are: int rank [100100]
int n,x0,m,s,x,h[N],pre[N],nxt[N],rank[N];
^
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++\utility:70,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:60,
from foo.cpp:5:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^
foo.cpp:112:2: error: reference to 'rank' is ambiguous
rank[0]=rank[n+1]=0;h[0]=inf;
^
foo.cpp:75:35: note: candidates are: int rank [100100]
int n,x0,m,s,x,h[N],pre[N],nxt[N],rank[N];
^
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++\utility:70,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:60,
from foo.cpp:5:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^
foo.cpp:112:10: error: reference to 'rank' is ambiguous
rank[0]=rank[n+1]=0;h[0]=inf;
^
foo.cpp:75:35: note: candidates are: int rank [100100]
int n,x0,m,s,x,h[N],pre[N],nxt[N],rank[N];
^
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++\utility:70,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:60,
from foo.cpp:5:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^
foo.cpp:114:7: error: reference to 'rank' is ambiguous
pre[rank[i]]=rank[i-1];
^
foo.cpp:75:35: note: candidates are: int rank [100100]
int n,x0,m,s,x,h[N],pre[N],nxt[N],rank[N];
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\move.h:57: