QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#149059#3532. Sequence explorationZhangYiDeCompile Error//C++201.8kb2023-08-23 23:36:032023-08-23 23:36:04

詳細信息

answer.code: In function ‘void solve()’:
answer.code:64:20: error: no match for ‘operator[]’ (operand types are ‘std::string [1000010]’ {aka ‘std::__cxx11::basic_string<char> [1000010]’} and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
   64 |         while(!mp[s[idx]]){
      |                    ^
answer.code:65:21: error: no match for ‘operator[]’ (operand types are ‘std::string [1000010]’ {aka ‘std::__cxx11::basic_string<char> [1000010]’} and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
   65 |                 mp[s[idx]]=idx;
      |                     ^
answer.code:66:19: error: no match for ‘operator++’ (operand type is ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
   66 |                 s[++idx]=getnext(s[idx]);
      |                   ^~~~~
answer.code:66:35: error: no match for ‘operator[]’ (operand types are ‘std::string [1000010]’ {aka ‘std::__cxx11::basic_string<char> [1000010]’} and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
   66 |                 s[++idx]=getnext(s[idx]);
      |                                   ^
answer.code:68:13: error: no match for ‘operator<=’ (operand types are ‘ll’ {aka ‘long long int’} and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
   68 |         if(n<=idx){
      |            ~^~~~~
      |            |  |
      |            |  std::string {aka std::__cxx11::basic_string<char>}
      |            ll {aka long long int}
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from answer.code:1:
/usr/include/c++/11/bits/regex.h:1222:5: note: candidate: ‘template<class _Bi_iter, class _Ch_traits, class _Alloc> auto std::__cxx11::operator<=>(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)’ (reversed)
 1222 |     operator<=>(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1222:5: note:   template argument deduction/substitution failed:
answer.code:68:15: note:   ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   68 |         if(n<=idx){
      |               ^~~
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from answer.code:1:
/usr/include/c++/11/bits/regex.h:1390:5: note: candidate: ‘template<class _Bi_iter> auto std::__cxx11::operator<=>(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)’ (reversed)
 1390 |     operator<=>(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1390:5: note:   template argument deduction/substitution failed:
answer.code:68:15: note:   ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   68 |         if(n<=idx){
      |               ^~~
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from answer.code:1:
/usr/include/c++/11/bits/regex.h:1563:5: note: candidate: ‘template<class _Bi_iter> auto std::__cxx11::operator<=>(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)’ (reversed)
 1563 |     operator<=>(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1563:5: note:   template argument deduction/substitution failed:
answer.code:68:15: note:   ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   68 |         if(n<=idx){
      |               ^~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_iterator.h:534:5: note: candidate: ‘template<class _IteratorL, class _IteratorR>  requires  three_way_comparable_with<_IteratorR, _IteratorL, std::partial_ordering> constexpr std::compare_three_way_result_t<_IteratorL, _IteratorR> std::operator<=>(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)’ (reversed)
  534 |     operator<=>(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:534:5: note:   template argument deduction/substitution failed:
answer.code:68:15: note:   ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘const std::reverse_iterator<_IteratorL>’
   68 |         if(n<=idx){
      |               ^~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/inc...