/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void addedge(int, int, int)':
/in/foo.cc:10:5: error: reference to 'next' is ambiguous
     next[tot] = head[u];
     ^~~~
/in/foo.cc:6:10: note: candidates are: int next [1005]
 int tot, next[N], head[N], adj[N], w[N], n, m, k, e, d, dis[N], f[N], a[N][N];
          ^~~~
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 Dijkstra()':
/in/foo.cc:56:34: error: reference to 'next' is ambiguous
   for(int e = head[minp]; e; e = next[e]) {
                                  ^~~~
/in/foo.cc:6:10: note: candidates are: int next [1005]
 int tot, next[N], head[N], adj[N], w[N], n, m, k, e, d, dis[N], f[N], a[N][N];
          ^~~~
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
     ^~~~

信息

递交者
类型
递交
题目
P1173 物流运输
语言
C++
递交时间
2017-08-08 22:39:56
评测时间
2017-08-08 22:39:56
评测机
分数
0
总耗时
116ms
峰值内存
14.871 MiB