/in/foo.cc: In function 'int bj(long long int, long long int)':
/in/foo.cc:14:5: error: reference to 'next' is ambiguous
next[++tot]=last[x];
^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][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/ostream:38,
from /usr/include/c++/7/iostream:39,
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:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
/in/foo.cc: In function 'int dg(long long int, long long int)':
/in/foo.cc:34:27: error: reference to 'next' is ambiguous
for(int i=last[x];i;i=next[i])
^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][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/ostream:38,
from /usr/include/c++/7/iostream:39,
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:48:27: error: reference to 'next' is ambiguous
for(int i=last[x];i;i=next[i])
^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][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/ostream:38,
from /usr/include/c++/7/iostream:39,
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:69:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:77:16: error: reference to 'next' is ambiguous
memset(next,0,sizeof(next));
^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][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/ostream:38,
from /usr/include/c++/7/iostream:39,
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:77:30: error: reference to 'next' is ambiguous
memset(next,0,sizeof(next));
^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][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/ostream:38,
from /usr/include/c++/7/iostream:39,
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:90:5: error: expected '}' at end of input
}
^