/in/foo.cc: In function 'void create(int, int, int, int)':
/in/foo.cc:11:2: error: reference to 'next' is ambiguous
next[nex]=head[u];
^~~~
/in/foo.cc:6:16: note: candidates are: int next [400]
int head[maxn],next[maxm],a[maxm],f[maxn][N],g[maxn][N],nex,len1[maxm],len2[maxm];
^~~~
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 /in/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
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:32:26: error: 'pointer' was not declared in this scope
for (int j=head[i];j;j=pointer[j])
^~~~~~~
/in/foo.cc:32:26: note: suggested alternative: 'printf'
for (int j=head[i];j;j=pointer[j])
^~~~~~~
printf