beads.cpp: In function 'void make(int, int, int)':
beads.cpp:14:22: error: reference to 'next' is ambiguous
++nEdge,to[nEdge]=b,next[nEdge]=start[a],start[a]=nEdge,len[nEdge]=c;
^~~~
beads.cpp:11:22: note: candidates are: int next [400010]
int nEdge=1,to[maxm],next[maxm],len[maxm],start[maxn];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from beads.cpp:5:
/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
^~~~
beads.cpp: In function 'void BFS(int)':
beads.cpp:33:26: error: reference to 'next' is ambiguous
for(int i=start[p];i;i=next[i])
^~~~
beads.cpp:11:22: note: candidates are: int next [400010]
int nEdge=1,to[maxm],next[maxm],len[maxm],start[maxn];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from beads.cpp:5:
/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
^~~~
beads.cpp:44:26: error: reference to 'next' is ambiguous
for(int j=start[p];j;j=next[j])
^~~~
beads.cpp:11:22: note: candidates are: int next [400010]
int nEdge=1,to[maxm],next[maxm],len[maxm],start[maxn];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from beads.cpp:5:
/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
^~~~
beads.cpp:48:28: error: reference to 'next' is ambiguous
for(int k=start[q];k;k=next[k])
^~~~
beads.cpp:11:22: note: candidates are: int next [400010]
int nEdge=1,to[maxm],next[maxm],len[maxm],start[maxn];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from beads.cpp:5:
/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
^~~~
beads.cpp:59:26: error: reference to 'next' is ambiguous
for(int j=start[p];j;j=next[j])
^~~~
beads.cpp:11:22: note: candidates are: int next [400010]
int nEdge=1,to[maxm],next[maxm],len[maxm],start[maxn];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from beads.cpp:5:
/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
^~~~
beads.cpp:71:26: error: reference to 'next' is ambiguous
for(int j=start[p];j;j=next[j])
^~~~
beads.cpp:11:22: note: candidates are: int next [400010]
int nEdge=1,to[maxm],next[maxm],len[maxm],start[maxn];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from beads.cpp:5:
/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
^~~~
beads.cpp: In function 'void read()':
beads.cpp:18:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
beads.cpp:21:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d",&a,&b,&c);
~~~~~^~~~~~~~~~~~~~~~~~~~~