/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void add(int, int, int)':
/in/foo.cc:14:2: error: reference to 'next' is ambiguous
  next[t]=first[x];
  ^~~~
/in/foo.cc:8:15: note: candidates are: int next [1000005]
 int v[M],w[M],next[M],first[N];
               ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from /in/foo.cc:3:
/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 'void getfather(int)':
/in/foo.cc:22:21: error: reference to 'next' is ambiguous
  for(i=first[x];i;i=next[i])
                     ^~~~
/in/foo.cc:8:15: note: candidates are: int next [1000005]
 int v[M],w[M],next[M],first[N];
               ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from /in/foo.cc:3:
/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 'void dfs(int, int)':
/in/foo.cc:56:21: error: reference to 'next' is ambiguous
  for(i=first[x];i;i=next[i])
                     ^~~~
/in/foo.cc:8:15: note: candidates are: int next [1000005]
 int v[M],w[M],next[M],first[N];
               ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from /in/foo.cc:3:
/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
     ^~~~

信息

递交者
类型
递交
题目
P1983 运输计划
语言
C++
递交时间
2018-11-07 22:58:33
评测时间
2018-11-07 22:58:33
评测机
分数
0
总耗时
122ms
峰值内存
15.582 MiB