ricehub.cpp: In function 'lli min_cost(int)':
ricehub.cpp:31:2: error: reference to 'prev' is ambiguous
prev[0] = 0;
^~~~
ricehub.cpp:15:5: note: candidates are: lli prev [100010]
lli prev[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
ricehub.cpp:33:3: error: reference to 'prev' is ambiguous
prev[i] = prev[i-1] + (pos[i]-pos[i-1])*1LL*min(i,p);
^~~~
ricehub.cpp:15:5: note: candidates are: lli prev [100010]
lli prev[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
ricehub.cpp:33:13: error: reference to 'prev' is ambiguous
prev[i] = prev[i-1] + (pos[i]-pos[i-1])*1LL*min(i,p);
^~~~
ricehub.cpp:15:5: note: candidates are: lli prev [100010]
lli prev[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
ricehub.cpp:34:13: error: reference to 'prev' is ambiguous
if(i > p) prev[i] -= (pos[i-1]-pos[i-p-1]);
^~~~
ricehub.cpp:15:5: note: candidates are: lli prev [100010]
lli prev[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
ricehub.cpp:37:2: error: reference to 'next' is ambiguous
next[N-1] =0;
^~~~
ricehub.cpp:16:5: note: candidates are: lli next [100010]
lli next[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/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
^~~~
ricehub.cpp:39:3: error: reference to 'next' is ambiguous
next[i] = next[i+1]+(pos[i+1]-pos[i])*1LL*min(N-i-1,n);
^~~~
ricehub.cpp:16:5: note: candidates are: lli next [100010]
lli next[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/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
^~~~
ricehub.cpp:39:13: error: reference to 'next' is ambiguous
next[i] = next[i+1]+(pos[i+1]-pos[i])*1LL*min(N-i-1,n);
^~~~
ricehub.cpp:16:5: note: candidates are: lli next [100010]
lli next[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/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
^~~~
ricehub.cpp:40:17: error: reference to 'next' is ambiguous
if(i+n < N-1) next[i] -= (pos[i+n+1]-pos[i+1]);
^~~~
ricehub.cpp:16:5: note: candidates are: lli next [100010]
lli next[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/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
^~~~
ricehub.cpp:45:11: error: reference to 'next' is ambiguous
cost = next[i]+prev[i];
^~~~
ricehub.cpp:16:5: note: candidates are: lli next [100010]
lli next[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/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
^~~~
ricehub.cpp:45:19: error: reference to 'prev' is ambiguous
cost = next[i]+prev[i];
^~~~
ricehub.cpp:15:5: note: candidates are: lli prev [100010]
lli prev[NMAX];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from ricehub.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~