记录详情

Compile Error

/in/foo.cc: In function 'void bord()':
/in/foo.cc:11:32: error: reference to 'next' is ambiguous
   while(k&&ans[k+1]!=ans[i]) k=next[k];
                                ^~~~
/in/foo.cc:4:5: note: candidates are: int next [400000]
 int next[400000];
     ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
/in/foo.cc:13:3: error: reference to 'next' is ambiguous
   next[i]=k;
   ^~~~
/in/foo.cc:4:5: note: candidates are: int next [400000]
 int next[400000];
     ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208: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:28:17: error: reference to 'next' is ambiguous
   printf("%d\n",next[aa]);
                 ^~~~
/in/foo.cc:4:5: note: candidates are: int next [400000]
 int next[400000];
     ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~

信息

递交者
类型
递交
题目
Border计数
语言
C++
递交时间
2017-10-04 14:52:37
评测时间
2017-10-04 14:52:37
评测机
分数
0
总耗时
358ms
峰值内存
29.801 MiB