hot.cpp: In function 'int get_next(int)':
hot.cpp:20:12: error: reference to 'next' is ambiguous
if (x != next[x]) next[x] = get_next(next[x]);
^~~~
hot.cpp:16:13: note: candidates are: std::vector<int> next
vector<int> next;
^~~~
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 hot.cpp:7:
/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
^~~~
hot.cpp:20:21: error: reference to 'next' is ambiguous
if (x != next[x]) next[x] = get_next(next[x]);
^~~~
hot.cpp:16:13: note: candidates are: std::vector<int> next
vector<int> next;
^~~~
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 hot.cpp:7:
/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
^~~~
hot.cpp:20:40: error: reference to 'next' is ambiguous
if (x != next[x]) next[x] = get_next(next[x]);
^~~~
hot.cpp:16:13: note: candidates are: std::vector<int> next
vector<int> next;
^~~~
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 hot.cpp:7:
/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
^~~~
hot.cpp:21:10: error: reference to 'next' is ambiguous
return next[x];
^~~~
hot.cpp:16:13: note: candidates are: std::vector<int> next
vector<int> next;
^~~~
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 hot.cpp:7:
/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
^~~~
hot.cpp: In function 'int main()':
hot.cpp:29:5: error: reference to 'next' is ambiguous
next.push_back(i);
^~~~
hot.cpp:16:13: note: candidates are: std::vector<int> next
vector<int> next;
^~~~
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 hot.cpp:7:
/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
^~~~
hot.cpp:31:3: error: reference to 'next' is ambiguous
next.push_back(n);
^~~~
hot.cpp:16:13: note: candidates are: std::vector<int> next
vector<int> next;
^~~~
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 hot.cpp:7:
/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
^~~~
hot.cpp:48:7: error: reference to 'next' is ambiguous
next[y] = y+1;
^~~~
hot.cpp:16:13: note: candidates are: std::vector<int> next
vector<int> next;
^~~~
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 hot.cpp:7:
/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
^~~~
hot.cpp:25:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d %d", &n, &m, &o);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
hot.cpp:27:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d", &x, &y);
~~~~~~^~~~~~~~~~~~~~~~~
hot.cpp:35:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d", &x, &y);
~~~~~~^~~~~~~~~~~~~~~~~