记录详情

Compile Error

/in/foo.cc: In function 'void cnct(int, int, int)':
/in/foo.cc:16:5: error: reference to 'next' is ambiguous
     next[tot]=v;
     ^~~~
/in/foo.cc:6:5: note: candidates are: int next [5000]
 int next[M],pre[M],last[M],apple[M],dp[M][M],n,m,tot=0;
     ^~~~
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 'int dfs(int, int)':
/in/foo.cc:26:15: error: reference to 'next' is ambiguous
         int v=next[i],value=apple[i];
               ^~~~
/in/foo.cc:6:5: note: candidates are: int next [5000]
 int next[M],pre[M],last[M],apple[M],dp[M][M],n,m,tot=0;
     ^~~~
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:32:57: error: 'value' was not declared in this scope
             dp[u][j]=max(dp[u][j],dp[u][j-k]+dp[v][k-1]+value);
                                                         ^~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:47:12: error: reference to 'next' is ambiguous
     memset(next,0,sizeof next);
            ^~~~
/in/foo.cc:6:5: note: candidates are: int next [5000]
 int next[M],pre[M],last[M],apple[M],dp[M][M],n,m,tot=0;
     ^~~~
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:47:26: error: reference to 'next' is ambiguous
     memset(next,0,sizeof next);
                          ^~~~
/in/foo.cc:6:5: note: candidates are: int next [5000]
 int next[M],pre[M],last[M],apple[M],dp[M][M],n,m,tot=0;
     ^~~~
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
     ^~~~

信息

递交者
类型
递交
题目
二叉苹果树
题目数据
下载
语言
C++
递交时间
2020-09-12 19:19:19
评测时间
2020-09-12 19:19:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes