/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void getrt(int, int)':
/in/foo.cc:17:27: error: reference to 'next' is ambiguous
     for(i=head[x];i!=-1;i=next[i])  if(!vis[to[i]]&&to[i]!=fa)
                           ^~~~
/in/foo.cc:10:17: note: candidates are: int next [2000020]
 int to[maxn<<1],next[maxn<<1],head[maxn],siz[maxn],vis[maxn],f[maxn],g[maxn],sf[maxn],sg[maxn];
                 ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:3:
/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 getdep(int, int, int, ull)':
/in/foo.cc:28:27: error: reference to 'next' is ambiguous
     for(i=head[x];i!=-1;i=next[i])  if(!vis[to[i]]&&to[i]!=fa)
                           ^~~~
/in/foo.cc:10:17: note: candidates are: int next [2000020]
 int to[maxn<<1],next[maxn<<1],head[maxn],siz[maxn],vis[maxn],f[maxn],g[maxn],sf[maxn],sg[maxn];
                 ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:3:
/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(int)':
/in/foo.cc:37:27: error: reference to 'next' is ambiguous
     for(i=head[x];i!=-1;i=next[i])  if(!vis[to[i]])
                           ^~~~
/in/foo.cc:10:17: note: candidates are: int next [2000020]
 int to[maxn<<1],next[maxn<<1],head[maxn],siz[maxn],vis[maxn],f[maxn],g[maxn],sf[maxn],sg[maxn];
                 ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:3:
/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:43:27: error: reference to 'next' is ambiguous
     for(i=head[x];i!=-1;i=next[i])  if(!vis[to[i]]) tot=siz[to[i]],mn=1<<30,getrt(to[i],x),dfs(rt);
                           ^~~~
/in/foo.cc:10:17: note: candidates are: int next [2000020]
 int to[maxn<<1],next[maxn<<1],head[maxn],siz[maxn],vis[maxn],f[maxn],g[maxn],sf[maxn],sg[maxn];
                 ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:3:
/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 add(int, int)':
/in/foo.cc:54:15: error: reference to 'next' is ambiguous
     to[cnt]=b,next[cnt]=head[a],head[a]=cnt++;
               ^~~~
/in/foo.cc:10:17: note: candidates are: int next [2000020]
 int to[maxn<<1],next[maxn<<1],head[maxn],siz[maxn],vis[maxn],f[maxn],g[maxn],sf[maxn],sg[maxn];
                 ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:3:
/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
     ^~~~

信息

递交者
类型
递交
题目
P1995 模式字符串
语言
C++
递交时间
2020-12-16 21:34:40
评测时间
2020-12-16 21:34:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes