advisor.cpp: In function 'void ComputeAdvice(int*, int, int, int)':
advisor.cpp:27:25: error: reference to 'next' is ambiguous
27 | for(int i=n-1;i>=0;i--)next[i]=position[d[i]],position[d[i]]=i;
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from advisor.cpp:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
advisor.cpp:17:5: note: 'int next [100000]'
17 | int next[MAXN];
| ^~~~
advisor.cpp:35:19: error: expected primary-expression before '(' token
35 | coda.push(Color(color,next[i]));
| ^
advisor.cpp:35:26: error: reference to 'next' is ambiguous
35 | coda.push(Color(color,next[i]));
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from advisor.cpp:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
advisor.cpp:17:5: note: 'int next [100000]'
17 | int next[MAXN];
| ^~~~
advisor.cpp:43:18: error: expected primary-expression before '(' token
43 | coda.push(Color(color,next[i]));
| ^
advisor.cpp:43:25: error: reference to 'next' is ambiguous
43 | coda.push(Color(color,next[i]));
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from advisor.cpp:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
advisor.cpp:17:5: note: 'int next [100000]'
17 | int next[MAXN];
| ^~~~