/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void link(int, int, int, int)':
/in/foo.cc:9:39: error: reference to 'next' is ambiguous
  num[++len]=y,cap[len]=z,cost[len]=+c,next[len]=head[x],head[x]=len;
                                       ^~~~
/in/foo.cc:6:37: note: candidates are: int next [10005]
 int n,m,k,len=1,a[N],head[N],num[N],next[N],cap[N],cost[N],ar[N],p[N],d[N],vis[N],ans,S,T;
                                     ^~~~
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/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/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:10:39: error: reference to 'next' is ambiguous
  num[++len]=x,cap[len]=0,cost[len]=-c,next[len]=head[y],head[y]=len;
                                       ^~~~
/in/foo.cc:6:37: note: candidates are: int next [10005]
 int n,m,k,len=1,a[N],head[N],num[N],next[N],cap[N],cost[N],ar[N],p[N],d[N],vis[N],ans,S,T;
                                     ^~~~
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/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/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 'bool spfa()':
/in/foo.cc:20:21: error: reference to 'next' is ambiguous
   for(i=head[x];i;i=next[i])
                     ^~~~
/in/foo.cc:6:37: note: candidates are: int next [10005]
 int n,m,k,len=1,a[N],head[N],num[N],next[N],cap[N],cost[N],ar[N],p[N],d[N],vis[N],ans,S,T;
                                     ^~~~
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/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/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
     ^~~~

信息

递交者
类型
递交
题目
P1499 炸毁燃料库
语言
C++
递交时间
2017-06-26 00:04:32
评测时间
2017-06-26 00:04:32
评测机
分数
0
总耗时
1019ms
峰值内存
128.488 MiB