/in/foo.cc: In function 'void addedge(int, int, int)':
/in/foo.cc:34:63: error: reference to 'next' is ambiguous
void addedge(int u,int v,int w){edge[++size]=v;weight[size]=w;next[size]=pre[u],pre[u]=size;}
^~~~
/in/foo.cc:33:34: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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 'void dfs_down(int)':
/in/foo.cc:17:38: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
/in/foo.cc:40:2: note: in expansion of macro 'Forp'
Forp(x)
^~~~
/in/foo.cc:33:34: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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 'void dfs_up(int)':
/in/foo.cc:17:38: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
/in/foo.cc:55:2: note: in expansion of macro 'Forp'
Forp(x)
^~~~
/in/foo.cc:33:34: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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:17:38: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
/in/foo.cc:64:2: note: in expansion of macro 'Forp'
Forp(x)
^~~~
/in/foo.cc:33:34: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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 'void find_circle(int)':
/in/foo.cc:17:38: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
/in/foo.cc:89:2: note: in expansion of macro 'Forp'
Forp(x)
^~~~
/in/foo.cc:33:34: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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 'void circle_down()':
/in/foo.cc:17:38: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
/in/foo.cc:117:3: note: in expansion of macro 'Forp'
Forp(x)
^~~~
/in/foo.cc:33:34: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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:116:6: warning: unused variable 'sum' [-Wunused-variable]
ld sum=0.0;
^~~
/in/foo.cc: In function 'void circle_up()':
/in/foo.cc:17:38: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
/in/foo.cc:157:3: note: in expansion of macro 'Forp'
Forp(x)
^~~~
/in/foo.cc:33:34: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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:17:38: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
/in/foo.cc:165:3: note: in expansion of macro 'Forp'
Forp(x)
^~~~
/in/foo.cc:33:34: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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:14:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define Rep(i,n) for(int i=0;i<n;i++)
/in/foo.cc:215:7:
Rep(i,q.size()) b[q[i]]=1;
~~~~~~~~~~
/in/foo.cc:215:3: note: in expansion of macro 'Rep'
Rep(i,q.size()) b[q[i]]=1;
^~~