/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void add(long long int, long long int, long long int)':
/in/foo.cc:14:5: error: reference to 'next' is ambiguous
 {   next[++t]=head[u];
     ^~~~
/in/foo.cc:4:26: note: candidates are: long long int next [1000010]
 long long n,m,head[maxn],next[maxn],to[maxn],w[maxn],cu[maxn],vis[maxn],t;;
                          ^~~~
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/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 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 'void dfs(int)':
/in/foo.cc:21:29: error: reference to 'next' is ambiguous
     for(int i=head[now];i;i=next[i])
                             ^~~~
/in/foo.cc:4:26: note: candidates are: long long int next [1000010]
 long long n,m,head[maxn],next[maxn],to[maxn],w[maxn],cu[maxn],vis[maxn],t;;
                          ^~~~
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/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 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
     ^~~~

信息

递交者
类型
递交
题目
P1966 夜夜的旅游计划
语言
C++
递交时间
2018-10-30 21:36:20
评测时间
2018-10-30 21:36:23
评测机
分数
0
总耗时
1165ms
峰值内存
132.816 MiB