记录详情

Compile Error

/in/foo.cc: In function 'int bj(long long int, long long int)':
/in/foo.cc:14:5: error: reference to 'next' is ambiguous
     next[++tot]=last[x];
     ^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
 long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][2];
                            ^~~~
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:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
/in/foo.cc: In function 'int dg(long long int, long long int)':
/in/foo.cc:34:27: error: reference to 'next' is ambiguous
     for(int i=last[x];i;i=next[i])
                           ^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
 long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][2];
                            ^~~~
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:48:27: error: reference to 'next' is ambiguous
     for(int i=last[x];i;i=next[i])
                           ^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
 long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][2];
                            ^~~~
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:69:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:77:16: error: reference to 'next' is ambiguous
         memset(next,0,sizeof(next));
                ^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
 long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][2];
                            ^~~~
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:77:30: error: reference to 'next' is ambiguous
         memset(next,0,sizeof(next));
                              ^~~~
/in/foo.cc:11:28: note: candidates are: long long int next [200010]
 long long n,ans,t,p,rec[N],next[N*2],last[N*2],to[N*2],tot,f[N][2],g[N][2];
                            ^~~~
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:90:5: error: expected '}' at end of input
     }
     ^

信息

递交者
类型
递交
题目
最大匹配
题目数据
下载
语言
C++
递交时间
2017-09-20 17:59:06
评测时间
2017-09-20 17:59:06
评测机
分数
0
总耗时
465ms
峰值内存
40.812 MiB