/ new_bzoj /

记录详情

Compile Error

/in/foo.cc: In function 'void AddEdge(int, int)':
/in/foo.cc:12:5: error: reference to 'next' is ambiguous
     next[e]=first[U];
     ^~~~
/in/foo.cc:8:21: note: candidates are: int next [50001]
 int e,v[M],first[N],next[M];
                     ^~~~
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:2:
/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:32:30: error: reference to 'next' is ambiguous
       for(int j=first[i];j;j=next[j])
                              ^~~~
/in/foo.cc:8:21: note: candidates are: int next [50001]
 int e,v[M],first[N],next[M];
                     ^~~~
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:2:
/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:39:30: error: reference to 'next' is ambiguous
       for(int j=first[i];j;j=next[j])
                              ^~~~
/in/foo.cc:8:21: note: candidates are: int next [50001]
 int e,v[M],first[N],next[M];
                     ^~~~
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:2:
/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:42:22: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll {aka long long int}' [-Wformat=]
     printf("%d\n",ans);
                      ^

信息

递交者
类型
递交
题目
Cow Traffic 奶牛交通
语言
C++
递交时间
2017-07-17 15:40:13
评测时间
2017-07-17 15:40:13
评测机
分数
0
总耗时
108ms
峰值内存
14.742 MiB