/in/foo.cc: In function 'void create(int, int, int, int)':
/in/foo.cc:9:21: error: reference to 'next' is ambiguous
edge++; a[edge]=v; next[edge]=head[u]; head[u]=edge;
^~~~
/in/foo.cc:6:16: note: candidates are: int next [400]
int head[maxn],next[maxm],a[maxm],f[maxn][N],g[maxn][N],edge,len1[maxm],len2[maxm];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/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 main()':
/in/foo.cc:29:26: error: reference to 'next' is ambiguous
for (int j=head[i];j;j=next[j])
^~~~
/in/foo.cc:6:16: note: candidates are: int next [400]
int head[maxn],next[maxm],a[maxm],f[maxn][N],g[maxn][N],edge,len1[maxm],len2[maxm];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/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
^~~~