/in/foo.cc: In function 'void getsa()':
/in/foo.cc:27:21: error: reference to 'rank' is ambiguous
for(i=1;i<n;++i)rank[sa[i]]=i;
^~~~
/in/foo.cc:4:32: note: candidates are: int rank [500010]
int wys[N],wa[N],wb[N],sa[N],n,rank[N],height[N],nxt[N],pre[N];
^~~~
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/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:28:28: error: reference to 'rank' is ambiguous
for(p=i=0;i<n-1;height[rank[i++]]=p)
^~~~
/in/foo.cc:4:32: note: candidates are: int rank [500010]
int wys[N],wa[N],wb[N],sa[N],n,rank[N],height[N],nxt[N],pre[N];
^~~~
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/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:29:27: error: reference to 'rank' is ambiguous
for(p-=(p>0),j=sa[rank[i]-1];str[i+p]==str[j+p];p++);
^~~~
/in/foo.cc:4:32: note: candidates are: int rank [500010]
int wys[N],wa[N],wb[N],sa[N],n,rank[N],height[N],nxt[N],pre[N];
^~~~
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/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~