记录详情

Compile Error

/in/foo.cc: In function 'void go(int)':
/in/foo.cc:20:5: error: reference to 'next' is ambiguous
   i=next[i];
     ^~~~
/in/foo.cc:4:23: note: candidates are: int next [10000]
 int n,m,k,s,ks[10000],next[10000],e[10000],a[10000];
                       ^~~~
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:36:3: error: reference to 'next' is ambiguous
   next[i]=ks[x]; ks[x]=i; e[i]=y;
   ^~~~
/in/foo.cc:4:23: note: candidates are: int next [10000]
 int n,m,k,s,ks[10000],next[10000],e[10000],a[10000];
                       ^~~~
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:37:3: error: reference to 'next' is ambiguous
   next[i+m]=ks[y]; ks[y]=i+m; e[i+m]=x;
   ^~~~
/in/foo.cc:4:23: note: candidates are: int next [10000]
 int n,m,k,s,ks[10000],next[10000],e[10000],a[10000];
                       ^~~~
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
     ^~~~

信息

递交者
类型
递交
题目
图的m着色问题
题目数据
下载
语言
C++
递交时间
2018-12-08 22:59:38
评测时间
2018-12-08 22:59:38
评测机
分数
0
总耗时
233ms
峰值内存
29.82 MiB