/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void addedge(int, int)':
/in/foo.cc:21:21: error: expected primary-expression before ')' token
     edge[++l]=(edges){y,next[x]};next[x]=l;
                     ^
/in/foo.cc:21:34: error: reference to 'next' is ambiguous
     edge[++l]=(edges){y,next[x]};next[x]=l;
                                  ^~~~
/in/foo.cc:19:5: note: candidates are: int next [101000]
 int next[maxn],l;
     ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 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:22:21: error: expected primary-expression before ')' token
     edge[++l]=(edges){x,next[y]};next[y]=l;
                     ^
/in/foo.cc:22:34: error: reference to 'next' is ambiguous
     edge[++l]=(edges){x,next[y]};next[y]=l;
                                  ^~~~
/in/foo.cc:19:5: note: candidates are: int next [101000]
 int next[maxn],l;
     ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 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 'void bfs()':
/in/foo.cc:28:20: error: reference to 'next' is ambiguous
         for (int i=next[u];i;i=edge[i].next)
                    ^~~~
/in/foo.cc:19:5: note: candidates are: int next [101000]
 int next[maxn],l;
     ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 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 'dd ch(double)':
/in/foo.cc:54:24: error: reference to 'next' is ambiguous
             for (int i=next[u];i;i=edge[i].next)
                        ^~~~
/in/foo.cc:19:5: note: candidates are: int next [101000]
 int next[maxn],l;
     ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 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:55:20: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
                 if (fa[u]!=edge[i].to)
                    ^
/in/foo.cc:62:24: error: reference to 'next' is ambiguous
             for (int i=next[u];i;i=edge[i].next) {
                        ^~~~
/in/foo.cc:19:5: note: candidates are: int next [101000]
 int next[maxn],l;
     ^~~~
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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 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
     ^~~~

信息

递交者
类型
递交
题目
P1962 嫁接树
语言
C++
递交时间
2020-07-08 21:22:26
评测时间
2020-07-08 21:22:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes