/in/foo.cc: In function 'void Build(int)':
/in/foo.cc:33:26: error: reference to 'rank' is ambiguous
for(int i=1;i<=n;++i)rank[sa[i]]=i;
^~~~
/in/foo.cc:11:63: note: candidates are: int rank [50010]
int n,t,q[maxn],t1[maxn],t2[maxn],c[1000005],s[maxn],sa[maxn],rank[maxn],h[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:3:
/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
int j=sa[rank[i]-1];
^~~~
/in/foo.cc:11:63: note: candidates are: int rank [50010]
int n,t,q[maxn],t1[maxn],t2[maxn],c[1000005],s[maxn],sa[maxn],rank[maxn],h[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:3:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:39:11: error: reference to 'rank' is ambiguous
h[rank[i]]=k;
^~~~
/in/foo.cc:11:63: note: candidates are: int rank [50010]
int n,t,q[maxn],t1[maxn],t2[maxn],c[1000005],s[maxn],sa[maxn],rank[maxn],h[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:3:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:48:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(int i=1;i<=n;++i)++s[i];Build(1000001);
^~~
/in/foo.cc:48:33: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
for(int i=1;i<=n;++i)++s[i];Build(1000001);
^~~~~