/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void Change(std::__cxx11::string&)':
/in/foo.cc:23:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0;i<s.length();i++)if(s[i]>='A'&&s[i]<='Z')s[i]+=32;
                 ~^~~~~~~~~~~
/in/foo.cc: In function 'bool Spfa()':
/in/foo.cc:55:17: error: reference to 'prev' is ambiguous
                 prev[v]=now;
                 ^~~~
/in/foo.cc:9:31: note: candidates are: int prev [100]
 int x[N],y[N],last[N],dist[N],prev[N],idx[N],val[N][N];
                               ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/deque:60,
                 from /usr/include/c++/6/queue:60,
                 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:62:24: error: reference to 'prev' is ambiguous
     for(int i=t;i!=s;i=prev[i]){e[idx[i]].w--;e[idx[i]^1].w++;}
                        ^~~~
/in/foo.cc:9:31: note: candidates are: int prev [100]
 int x[N],y[N],last[N],dist[N],prev[N],idx[N],val[N][N];
                               ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/deque:60,
                 from /usr/include/c++/6/queue:60,
                 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
     ^~~~

信息

递交者
类型
递交
题目
P1169 丘比特的烦恼
语言
C++
递交时间
2020-07-03 23:35:15
评测时间
2020-07-03 23:35:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes