QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#510877#5206. Hot and ColdZhaoZiLongCompile Error//C++203.4kb2024-08-09 13:48:412024-08-09 13:48:42

Details

answer.code: In function ‘void solvex(int, int, int)’:
answer.code:26:20: error: no matching function for call to ‘getline(std::istream&, char [33])’
   26 |             getline(cin,s);
      |             ~~~~~~~^~~~~~~
In file included from /usr/include/c++/13/string:55,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
                 from answer.code:1:
/usr/include/c++/13/bits/basic_string.tcc:893:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)’
  893 |     getline(basic_istream<_CharT, _Traits>& __in,
      |     ^~~~~~~
/usr/include/c++/13/bits/basic_string.tcc:893:5: note:   template argument deduction/substitution failed:
answer.code:26:20: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘char [33]’
   26 |             getline(cin,s);
      |             ~~~~~~~^~~~~~~
In file included from /usr/include/c++/13/string:54:
/usr/include/c++/13/bits/basic_string.h:4060:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)’
 4060 |     getline(basic_istream<_CharT, _Traits>& __is,
      |     ^~~~~~~
/usr/include/c++/13/bits/basic_string.h:4060:5: note:   template argument deduction/substitution failed:
answer.code:26:20: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘char [33]’
   26 |             getline(cin,s);
      |             ~~~~~~~^~~~~~~
/usr/include/c++/13/bits/basic_string.h:4068:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)’
 4068 |     getline(basic_istream<_CharT, _Traits>&& __is,
      |     ^~~~~~~
/usr/include/c++/13/bits/basic_string.h:4068:5: note:   template argument deduction/substitution failed:
answer.code:26:20: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘char [33]’
   26 |             getline(cin,s);
      |             ~~~~~~~^~~~~~~
/usr/include/c++/13/bits/basic_string.h:4075:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)’
 4075 |     getline(basic_istream<_CharT, _Traits>&& __is,
      |     ^~~~~~~
/usr/include/c++/13/bits/basic_string.h:4075:5: note:   template argument deduction/substitution failed:
answer.code:26:20: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘char [33]’
   26 |             getline(cin,s);
      |             ~~~~~~~^~~~~~~
In file included from /usr/include/stdio.h:864,
                 from /usr/include/c++/13/cstdio:42,
                 from /usr/include/c++/13/ext/string_conversions.h:45,
                 from /usr/include/c++/13/bits/basic_string.h:4097:
/usr/include/x86_64-linux-gnu/bits/stdio.h:118:1: note: candidate: ‘__ssize_t getline(char**, size_t*, FILE*)’
  118 | getline (char **__lineptr, size_t *__n, FILE *__stream)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/bits/stdio.h:118:1: note:   candidate expects 3 arguments, 2 provided
answer.code:44:12: error: no matching function for call to ‘getline(std::istream&, char [33])’
   44 |     getline(cin,s);
      |     ~~~~~~~^~~~~~~
/usr/include/c++/13/bits/basic_string.tcc:893:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)’
  893 |     getline(basic_istream<_CharT, _Traits>& __in,
      |     ^~~~~~~
/usr/include/c++/13/bits/basic_string.tcc:893:5: note:   template argument deduction/substitution failed:
answer.code:44:12: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘char [33]’
   44 |     getline(cin,s);
      |     ~~~~~~~^~~~~~~
/usr/include/c++/13/bits/basic_string.h:4060:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)’
 4060 |     getline(basic_istream<_CharT, _Traits>& __is,
      |     ^~~~~~~
/usr/include/c++/13/bits/basic_string.h:4060:5: note:   template argument deduction/substitution failed:
answer.code:44:12: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘char [33]’
   44 |     getline(cin,s);
      |     ~~~~~~~^~~~~~~
/usr/include/c++/13/bits/basic_string.h:4068:5: note: candidate...