QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#574160#9320. Find the Easiest ProblemMaMengQiCompile Error//C++23538b2024-09-18 20:57:272024-09-18 20:57:29

Details

answer.code: In function ‘int main()’:
answer.code:20:80: error: no matching function for call to ‘std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >::pair(std::string&, char&)’
   20 |                                 mp[(int)(s)-65].insert(pair<string,string>(s1,s));
      |                                                                                ^
In file included from /usr/include/c++/13/bits/stl_algobase.h:64,
                 from /usr/include/c++/13/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_pair.h:386:9: note: candidate: ‘template<class _U1, class _U2>  requires  _S_constructible<const _U1, const _U2>() && _S_dangles<const _U1, const _U2>() constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&&) [with _U2 = _U1; _T1 = std::__cxx11::basic_string<char>; _T2 = std::__cxx11::basic_string<char>]’ (deleted)
  386 |         pair(const pair<_U1, _U2>&&) = delete;
      |         ^~~~
/usr/include/c++/13/bits/stl_pair.h:386:9: note:   template argument deduction/substitution failed:
answer.code:20:80: note:   ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘const std::pair<_T1, _T2>’
   20 |                                 mp[(int)(s)-65].insert(pair<string,string>(s1,s));
      |                                                                                ^
/usr/include/c++/13/bits/stl_pair.h:376:9: note: candidate: ‘template<class _U1, class _U2>  requires  _S_constructible<const _U1, const _U2>() && !_S_dangles<const _U1, const _U2>() constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&&) [with _U2 = _U1; _T1 = std::__cxx11::basic_string<char>; _T2 = std::__cxx11::basic_string<char>]’
  376 |         pair(const pair<_U1, _U2>&& __p)
      |         ^~~~
/usr/include/c++/13/bits/stl_pair.h:376:9: note:   template argument deduction/substitution failed:
answer.code:20:80: note:   ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘const std::pair<_T1, _T2>’
   20 |                                 mp[(int)(s)-65].insert(pair<string,string>(s1,s));
      |                                                                                ^
/usr/include/c++/13/bits/stl_pair.h:369:9: note: candidate: ‘template<class _U1, class _U2>  requires  _S_constructible<_U1&, _U2&>() && _S_dangles<_U1&, _U2&>() constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&) [with _U2 = _U1; _T1 = std::__cxx11::basic_string<char>; _T2 = std::__cxx11::basic_string<char>]’ (deleted)
  369 |         pair(pair<_U1, _U2>&) = delete;
      |         ^~~~
/usr/include/c++/13/bits/stl_pair.h:369:9: note:   template argument deduction/substitution failed:
answer.code:20:80: note:   ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘std::pair<_T1, _T2>’
   20 |                                 mp[(int)(s)-65].insert(pair<string,string>(s1,s));
      |                                                                                ^
/usr/include/c++/13/bits/stl_pair.h:361:9: note: candidate: ‘template<class _U1, class _U2>  requires  _S_constructible<_U1&, _U2&>() && !_S_dangles<_U1&, _U2&>() constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&) [with _U2 = _U1; _T1 = std::__cxx11::basic_string<char>; _T2 = std::__cxx11::basic_string<char>]’
  361 |         pair(pair<_U1, _U2>& __p)
      |         ^~~~
/usr/include/c++/13/bits/stl_pair.h:361:9: note:   template argument deduction/substitution failed:
answer.code:20:80: note:   ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘std::pair<_T1, _T2>’
   20 |                                 mp[(int)(s)-65].insert(pair<string,string>(s1,s));
      |                                                                                ^
/usr/include/c++/13/bits/stl_pair.h:354:9: note: candidate: ‘template<class _U1, class _U2>  requires  _S_constructible<_U1, _U2>() && _S_dangles<_U1, _U2>() constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U2 = _U1; _T1 = std::__cxx11::basic_string<char>; _T2 = std::__cxx11::basic_string<char>]’ (deleted)
  354 |         pair(pair<_U1, _U2>&&) = delete;
      |         ^~~~
/usr/include/c++/13/bits/stl_pair.h:354:9: note:   template argument deduction/substitution failed:
answer.code:20:80: note:   ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘std::pair<_T1, _T2>’
   20 |                                 mp[(int)(s)-65].insert(pair<string,string>(s1,s));
      |                                                                                ^
/usr/include/c++/13/bits/stl_pair.h:345:9: note: candidate: ‘template<class _U1, class _U2>  requires  _S_constructible<_U1, _U2>() && !_S_dangles<_U1, _U2>() constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U2 = _U1; _T1 = std::__cxx11::basic_string<char>; _T2 = std::__cxx11::basic_string<char>]’
  345 |  ...