QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#214960#5605. A-Mazing PuzzleHuangHanShengCompile Error//C++173.1kb2023-10-15 01:47:132023-10-15 01:47:14

詳細信息

answer.code: In function ‘int main()’:
answer.code:18:33: error: no matching function for call to ‘find(const char [5], const char*, char&)’
   18 |     int orient = (4 + (std::find(DIR_CHAR, DIR_CHAR+4, d2) - DIR_CHAR) - (std::find(DIR_CHAR, DIR_CHAR+4, d1) - DIR_CHAR)) % 4;
      |                        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/locale_facets.h:48,
                 from /usr/include/c++/11/bits/basic_ios.h:37,
                 from /usr/include/c++/11/ios:44,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from answer.code:1:
/usr/include/c++/11/bits/streambuf_iterator.h:421:5: note: candidate: ‘template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >, const _CharT2&)’
  421 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/11/bits/streambuf_iterator.h:421:5: note:   template argument deduction/substitution failed:
answer.code:18:33: note:   mismatched types ‘std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >’ and ‘const char*’
   18 |     int orient = (4 + (std::find(DIR_CHAR, DIR_CHAR+4, d2) - DIR_CHAR) - (std::find(DIR_CHAR, DIR_CHAR+4, d1) - DIR_CHAR)) % 4;
      |                        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code:18:84: error: no matching function for call to ‘find(const char [5], const char*, char&)’
   18 |     int orient = (4 + (std::find(DIR_CHAR, DIR_CHAR+4, d2) - DIR_CHAR) - (std::find(DIR_CHAR, DIR_CHAR+4, d1) - DIR_CHAR)) % 4;
      |                                                                           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/locale_facets.h:48,
                 from /usr/include/c++/11/bits/basic_ios.h:37,
                 from /usr/include/c++/11/ios:44,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from answer.code:1:
/usr/include/c++/11/bits/streambuf_iterator.h:421:5: note: candidate: ‘template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >, const _CharT2&)’
  421 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/11/bits/streambuf_iterator.h:421:5: note:   template argument deduction/substitution failed:
answer.code:18:84: note:   mismatched types ‘std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >’ and ‘const char*’
   18 |     int orient = (4 + (std::find(DIR_CHAR, DIR_CHAR+4, d2) - DIR_CHAR) - (std::find(DIR_CHAR, DIR_CHAR+4, d1) - DIR_CHAR)) % 4;
      |                                                                           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~