advisor.cpp: In function 'void ComputeAdvice(int*, int, int, int)':
advisor.cpp:16:21: error: reference to 'next' is ambiguous
for(i=N-1;i>=0;i--)next[i]=now[C[i]],now[C[i]]=i;
^~~~
advisor.cpp:10:5: note: candidates are: int next [100010]
int next[100010],now[100010];
^~~~
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:2:
/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:27:13: error: expected primary-expression before '(' token
pq.push(Pi(next[i],C[i]));
^
advisor.cpp:27:14: error: reference to 'next' is ambiguous
pq.push(Pi(next[i],C[i]));
^~~~
advisor.cpp:10:5: note: candidates are: int next [100010]
int next[100010],now[100010];
^~~~
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:2:
/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
^~~~