brunhilda.cpp: In function 'int main()':
brunhilda.cpp:29:2: error: reference to 'next' is ambiguous
next = num[0];
^
brunhilda.cpp:14:40: note: candidates are: int next
int n, m, a[100009], j, num[10000009], next, cur, t = 1, ans[10000009];
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:66:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from brunhilda.cpp:1:
/usr/include/c++/5/bits/stl_iterator_base_funcs.h:184:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^
brunhilda.cpp:34:14: error: reference to 'next' is ambiguous
while(i >= next && cur < i)
^
brunhilda.cpp:14:40: note: candidates are: int next
int n, m, a[100009], j, num[10000009], next, cur, t = 1, ans[10000009];
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:66:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from brunhilda.cpp:1:
/usr/include/c++/5/bits/stl_iterator_base_funcs.h:184:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^
brunhilda.cpp:38:4: error: reference to 'next' is ambiguous
next = num[cur] + cur;
^
brunhilda.cpp:14:40: note: candidates are: int next
int n, m, a[100009], j, num[10000009], next, cur, t = 1, ans[10000009];
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:66:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from brunhilda.cpp:1:
/usr/include/c++/5/bits/stl_iterator_base_funcs.h:184:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^