/in/foo.cc: In function 'int main()':
/in/foo.cc:27:2: error: reference to 'next' is ambiguous
next[0]=0;
^~~~
/in/foo.cc:12:5: note: candidates are: int next [1000100]
int next[maxn],pre[maxn];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:5:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:31:9: error: reference to 'next' is ambiguous
int j=next[top-1];
^~~~
/in/foo.cc:12:5: note: candidates are: int next [1000100]
int next[maxn],pre[maxn];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:5:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:34:3: error: reference to 'next' is ambiguous
next[top]=j;
^~~~
/in/foo.cc:12:5: note: candidates are: int next [1000100]
int next[maxn],pre[maxn];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:5:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:35:7: error: reference to 'next' is ambiguous
if (next[top]==m) top-=m;
^~~~
/in/foo.cc:12:5: note: candidates are: int next [1000100]
int next[maxn],pre[maxn];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:5:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:37:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (int i=1;i<=top;i++) printf("%c",s[i]);printf("\n");
^~~
/in/foo.cc:37:45: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
for (int i=1;i<=top;i++) printf("%c",s[i]);printf("\n");
^~~~~~