QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#607009 | #4120. 双旋转字符串 | 3un_larryfunc | Compile Error | / | / | C++20 | 2.3kb | 2024-10-03 13:36:11 | 2024-10-03 13:36:13 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘void KMP(bool)’: answer.code:49:33: error: reference to ‘next’ is ambiguous 49 | while(k&&a[j]!=a[k+1])k=next[k]; | ^~~~ In file included from /usr/include/c++/13/bits/stl_algobase.h:66, from /usr/include/c++/13/algorithm:60, from answer.code:3: /usr/include/c++/13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: ‘template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)’ 232 | next(_InputIterator __x, typename | ^~~~ answer.code:15:57: note: ‘int next [4000001]’ 15 | int i,j,Ts,Tt,n,m,w,u,v,b1[M1],b2[M2],h1[M1],h2[M2],len,next[N]; | ^~~~ answer.code:50:25: error: reference to ‘next’ is ambiguous 50 | if(a[j]==a[k+1])next[j]=++k; | ^~~~ /usr/include/c++/13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: ‘template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)’ 232 | next(_InputIterator __x, typename | ^~~~ answer.code:15:57: note: ‘int next [4000001]’ 15 | int i,j,Ts,Tt,n,m,w,u,v,b1[M1],b2[M2],h1[M1],h2[M2],len,next[N]; | ^~~~ answer.code:56:33: error: reference to ‘next’ is ambiguous 56 | while(k&&s[j]!=a[k+1])k=next[k]; | ^~~~ /usr/include/c++/13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: ‘template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)’ 232 | next(_InputIterator __x, typename | ^~~~ answer.code:15:57: note: ‘int next [4000001]’ 15 | int i,j,Ts,Tt,n,m,w,u,v,b1[M1],b2[M2],h1[M1],h2[M2],len,next[N]; | ^~~~ answer.code:69:15: error: reference to ‘next’ is ambiguous 69 | k=next[k]; | ^~~~ /usr/include/c++/13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: ‘template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)’ 232 | next(_InputIterator __x, typename | ^~~~ answer.code:15:57: note: ‘int next [4000001]’ 15 | int i,j,Ts,Tt,n,m,w,u,v,b1[M1],b2[M2],h1[M1],h2[M2],len,next[N]; | ^~~~ answer.code: In function ‘int main()’: answer.code:76:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 76 | scanf("%d%d%d%d",&Ts,&Tt,&n,&m); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ answer.code:81:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 81 | scanf("%s",s+1); | ~~~~~^~~~~~~~~~ answer.code:104:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 104 | scanf("%s",s+1); | ~~~~~^~~~~~~~~~