foo.cc: In function 'void add(int, int, int)':
foo.cc:22:43: error: reference to 'next' is ambiguous
tot++; to[ tot ] = y , w[ tot ] = z , next[ tot ] = head[ x ] , head[ x ] = tot;
^~~~
foo.cc:6:60: note: candidates are: int next [800380]
int head[ N*2 ] , d[ N*2 ] , to[ N*10*2 ] , w[ N*10*2 ] , next[ N*10*2 ] ;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from foo.cc: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
^~~~
foo.cc:23:43: error: reference to 'next' is ambiguous
tot++; to[ tot ] = x , w[ tot ] = 0 , next[ tot ] = head[ y ] , head[ y ] = tot;
^~~~
foo.cc:6:60: note: candidates are: int next [800380]
int head[ N*2 ] , d[ N*2 ] , to[ N*10*2 ] , w[ N*10*2 ] , next[ N*10*2 ] ;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from foo.cc: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
^~~~
foo.cc: In function 'bool bfs()':
foo.cc:32:43: error: reference to 'next' is ambiguous
for( int i = head[ x ] ; i ; i = next[ i ])
^~~~
foo.cc:6:60: note: candidates are: int next [800380]
int head[ N*2 ] , d[ N*2 ] , to[ N*10*2 ] , w[ N*10*2 ] , next[ N*10*2 ] ;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from foo.cc: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
^~~~
foo.cc: In function 'int dinic(int, int)':
foo.cc:45:47: error: reference to 'next' is ambiguous
for( int i = head[ x ] ; i && rest ; i = next[ i ] )//当前可流入最大流量不为0 ,
^~~~
foo.cc:6:60: note: candidates are: int next [800380]
int head[ N*2 ] , d[ N*2 ] , to[ N*10*2 ] , w[ N*10*2 ] , next[ N*10*2 ] ;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from foo.cc: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
^~~~
foo.cc: In function 'void clear()':
foo.cc:59:40: error: reference to 'next' is ambiguous
w[ i ] = to[ i ] = head[ i ] = next[ i ] = 0 ;
^~~~
foo.cc:6:60: note: candidates are: int next [800380]
int head[ N*2 ] , d[ N*2 ] , to[ N*10*2 ] , w[ N*10*2 ] , next[ N*10*2 ] ;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from foo.cc: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
^~~~
foo.cc: In function 'int main()':
foo.cc:81:25: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
while( flow = dinic ( s , inf ))maxflow += flow ;
~~~~~^~~~~~~~~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。