/in/foo.cc: In function 'void add(int, int, int)':
/in/foo.cc:11:33: error: reference to 'next' is ambiguous
to[++cnt] = y , val[cnt] = z , next[cnt] = head[x] , head[x] = cnt;
^~~~
/in/foo.cc:8:54: note: candidates are: int next [150010]
int n , m , x[N] , y[N] , head[N] , to[M] , val[M] , next[M] , cnt , s , t , dis[N];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/deque:60,
from /usr/include/c++/6/queue:60,
from /in/foo.cc:3:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:12:33: error: reference to 'next' is ambiguous
to[++cnt] = x , val[cnt] = 0 , next[cnt] = head[y] , head[y] = cnt;
^~~~
/in/foo.cc:8:54: note: candidates are: int next [150010]
int n , m , x[N] , y[N] , head[N] , to[M] , val[M] , next[M] , cnt , s , t , dis[N];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/deque:60,
from /usr/include/c++/6/queue:60,
from /in/foo.cc:3:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc: In function 'bool bfs()':
/in/foo.cc:23:29: error: reference to 'next' is ambiguous
for(i = head[x] ; i ; i = next[i])
^~~~
/in/foo.cc:8:54: note: candidates are: int next [150010]
int n , m , x[N] , y[N] , head[N] , to[M] , val[M] , next[M] , cnt , s , t , dis[N];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/deque:60,
from /usr/include/c++/6/queue:60,
from /in/foo.cc:3:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc: In function 'int dinic(int, int)':
/in/foo.cc:39:28: error: reference to 'next' is ambiguous
for(i = head[x] ; i ; i = next[i])
^~~~
/in/foo.cc:8:54: note: candidates are: int next [150010]
int n , m , x[N] , y[N] , head[N] , to[M] , val[M] , next[M] , cnt , s , t , dis[N];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/deque:60,
from /usr/include/c++/6/queue:60,
from /in/foo.cc:3:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~