/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'bool spfa()':
/in/foo.cc:84:5: error: reference to 'prev' is ambiguous
     prev[S]=-1;
     ^~~~
/in/foo.cc:42:27: note: candidates are: int prev [1003]
 int demond[MAXN],sp[MAXN],prev[MAXN];
                           ^~~~
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:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:217:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
/in/foo.cc:94:17: error: reference to 'prev' is ambiguous
                 prev[v]=u;
                 ^~~~
/in/foo.cc:42:27: note: candidates are: int prev [1003]
 int demond[MAXN],sp[MAXN],prev[MAXN];
                           ^~~~
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:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:217:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
/in/foo.cc: In function 'int argument()':
/in/foo.cc:107:14: error: reference to 'prev' is ambiguous
     for (i=T;prev[i]!=-1;i=prev[i])
              ^~~~
/in/foo.cc:42:27: note: candidates are: int prev [1003]
 int demond[MAXN],sp[MAXN],prev[MAXN];
                           ^~~~
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:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:217:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
/in/foo.cc:107:28: error: reference to 'prev' is ambiguous
     for (i=T;prev[i]!=-1;i=prev[i])
                            ^~~~
/in/foo.cc:42:27: note: candidates are: int prev [1003]
 int demond[MAXN],sp[MAXN],prev[MAXN];
                           ^~~~
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:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:217:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
/in/foo.cc:113:14: error: reference to 'prev' is ambiguous
     for (i=T;prev[i]!=-1;i=prev[i])
              ^~~~
/in/foo.cc:42:27: note: candidates are: int prev [1003]
 int demond[MAXN],sp[MAXN],prev[MAXN];
                           ^~~~
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:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:217:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
/in/foo.cc:113:28: error: reference to 'prev' is ambiguous
     for (i=T;prev[i]!=-1;i=prev[i])
                            ^~~~
/in/foo.cc:42:27: note: candidates are: int prev [1003]
 int demond[MAXN],sp[MAXN],prev[MAXN];
                           ^~~~
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:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:217:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~

信息

递交者
类型
递交
题目
P1825 志愿者招募
语言
C++
递交时间
2017-07-29 18:57:19
评测时间
2017-07-29 18:57:19
评测机
分数
0
总耗时
300ms
峰值内存
29.508 MiB