QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#734324#5254. Differencesucup-team3932Compile Error//C++201.4kb2024-11-11 08:55:132024-11-11 08:55:21

Details

answer.code: In function ‘int main()’:
answer.code:42:7: error: ‘reverse’ was not declared in this scope
   42 |       reverse(to_remove.begin(), to_remove.end());
      |       ^~~~~~~
answer.code:59:19: error: no matching function for call to ‘find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, const std::__cxx11::basic_string<char>&)’
   59 |       cout << find(S.begin(), S.end(), candidate) - S.begin() + 1 << "\n";
      |               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/bits/locale_facets.h:48,
                 from /usr/include/c++/13/bits/basic_ios.h:37,
                 from /usr/include/c++/13/ios:46,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 from answer.code:1:
/usr/include/c++/13/bits/streambuf_iterator.h:435:5: note: candidate: ‘template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)’
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/13/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
answer.code:59:19: note:   ‘__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >’ is not derived from ‘std::istreambuf_iterator<_CharT>’
   59 |       cout << find(S.begin(), S.end(), candidate) - S.begin() + 1 << "\n";
      |               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~