advisor.cpp: In function 'void ComputeAdvice(int*, int, int, int)':
advisor.cpp:56:9: error: reference to 'next' is ambiguous
next[i] = position[d[i]];
^~~~
advisor.cpp:34:5: note: candidates are: int next [100000]
int next[MAXN]; // next[i] = index of next occurrence of d[i] in array d (n if it is the last occurrence)
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from advisor.cpp:8:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
advisor.cpp:72:29: error: expected primary-expression before '(' token
coda.push( Color( color, next[i] ) );
^
advisor.cpp:72:38: error: reference to 'next' is ambiguous
coda.push( Color( color, next[i] ) );
^~~~
advisor.cpp:34:5: note: candidates are: int next [100000]
int next[MAXN]; // next[i] = index of next occurrence of d[i] in array d (n if it is the last occurrence)
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from advisor.cpp:8:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
advisor.cpp:87:25: error: expected primary-expression before '(' token
coda.push( Color( color, next[i] ) );
^
advisor.cpp:87:34: error: reference to 'next' is ambiguous
coda.push( Color( color, next[i] ) );
^~~~
advisor.cpp:34:5: note: candidates are: int next [100000]
int next[MAXN]; // next[i] = index of next occurrence of d[i] in array d (n if it is the last occurrence)
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from advisor.cpp:8:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~