/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:38:4: error: reference to 'next' is ambiguous
    next[cnt] = head[p];
    ^~~~
/in/foo.cc:9:41: note: candidates are: int next [500005]
 int f[500005],head[500005],data[500005],next[500005],last_w[500005],first_w[500005];
                                         ^~~~
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:58:29: error: reference to 'next' is ambiguous
    for(j = head[i];j!=0;j = next[j]){
                             ^~~~
/in/foo.cc:9:41: note: candidates are: int next [500005]
 int f[500005],head[500005],data[500005],next[500005],last_w[500005],first_w[500005];
                                         ^~~~
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
     ^~~~

信息

递交者
类型
递交
题目
P1990 黑白序列
语言
C++
递交时间
2017-09-05 22:28:06
评测时间
2017-09-05 22:28:06
评测机
分数
0
总耗时
115ms
峰值内存
14.863 MiB