/in/foo.cc: In function 'void dfs(int, int, int)':
/in/foo.cc:47:12: error: reference to 'next' is ambiguous
i=next[i];
^~~~
/in/foo.cc:9:30: note: candidates are: int next [105]
int n,a[105],sum,minn,u[105],next[105],len,book,s;
^~~~
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:3:
/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:16:8: warning: unused variable 'j' [-Wunused-variable]
int i,j;
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:67:2: error: reference to 'next' is ambiguous
next[n]=n;
^~~~
/in/foo.cc:9:30: note: candidates are: int next [105]
int n,a[105],sum,minn,u[105],next[105],len,book,s;
^~~~
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:3:
/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:69:26: error: reference to 'next' is ambiguous
if(a[i]==a[i+1]) next[i]=next[i+1];
^~~~
/in/foo.cc:9:30: note: candidates are: int next [105]
int n,a[105],sum,minn,u[105],next[105],len,book,s;
^~~~
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:3:
/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:69:34: error: reference to 'next' is ambiguous
if(a[i]==a[i+1]) next[i]=next[i+1];
^~~~
/in/foo.cc:9:30: note: candidates are: int next [105]
int n,a[105],sum,minn,u[105],next[105],len,book,s;
^~~~
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:3:
/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:70:14: error: reference to 'next' is ambiguous
else next[i]=i;
^~~~
/in/foo.cc:9:30: note: candidates are: int next [105]
int n,a[105],sum,minn,u[105],next[105],len,book,s;
^~~~
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:3:
/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
^~~~