记录详情

Compile Error

/in/foo.cc: In function 'void addedge(int, int, long long int)':
/in/foo.cc:40:33: error: reference to 'next' is ambiguous
  to[edges] = v; wei[edges] = w; next[edges] = head[u];
                                 ^~~~
/in/foo.cc:35:5: note: candidates are: int next [200200]
 int next[maxn * 2], to[maxn * 2], edges;
     ^~~~
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:5:
/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:33: error: reference to 'next' is ambiguous
  to[edges] = u; wei[edges] = w; next[edges] = head[v];
                                 ^~~~
/in/foo.cc:35:5: note: candidates are: int next [200200]
 int next[maxn * 2], to[maxn * 2], edges;
     ^~~~
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:5:
/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:49:36: error: reference to 'next' is ambiguous
  for(int e = head[x]; e != -1; e = next[e]) if(to[e] != fa[x])
                                    ^~~~
/in/foo.cc:35:5: note: candidates are: int next [200200]
 int next[maxn * 2], to[maxn * 2], edges;
     ^~~~
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:5:
/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 'long long int find_zj(int)':
/in/foo.cc:69:37: error: reference to 'next' is ambiguous
   for(int e = head[x]; e != -1; e = next[e]) if(to[e] != pa && !erase[e])
                                     ^~~~
/in/foo.cc:35:5: note: candidates are: int next [200200]
 int next[maxn * 2], to[maxn * 2], edges;
     ^~~~
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:5:
/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:85:37: error: reference to 'next' is ambiguous
   for(int e = head[x]; e != -1; e = next[e]) if(to[e] != pa && !erase[e])
                                     ^~~~
/in/foo.cc:35:5: note: candidates are: int next [200200]
 int next[maxn * 2], to[maxn * 2], edges;
     ^~~~
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:5:
/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
     ^~~~

信息

递交者
类型
递交
题目
快餐店
语言
C++
递交时间
2017-09-08 14:32:02
评测时间
2017-09-08 14:32:02
评测机
分数
0
总耗时
413ms
峰值内存
52.754 MiB