QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#785010#9790. Make Swamp Great Againucup-team1378#Compile Error//C++20619b2024-11-26 16:36:182024-11-26 16:36:19

詳細信息

answer.code: In function ‘int main()’:
answer.code:19:22: error: no matching function for call to ‘min(<brace-enclosed initializer list>)’
   19 |         good[std::min({a[i], a[j], a[k]})] = true;
      |              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/string:51,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
answer.code:19:22: note:   candidate expects 2 arguments, 1 provided
   19 |         good[std::min({a[i], a[j], a[k]})] = true;
      |              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note:   template argument deduction/substitution failed:
answer.code:19:22: note:   candidate expects 3 arguments, 1 provided
   19 |         good[std::min({a[i], a[j], a[k]})] = true;
      |              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
answer.code:20:22: error: no matching function for call to ‘max(<brace-enclosed initializer list>)’
   20 |         good[std::max({a[i], a[j], a[k]})] = true;
      |              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
answer.code:20:22: note:   candidate expects 2 arguments, 1 provided
   20 |         good[std::max({a[i], a[j], a[k]})] = true;
      |              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note:   template argument deduction/substitution failed:
answer.code:20:22: note:   candidate expects 3 arguments, 1 provided
   20 |         good[std::max({a[i], a[j], a[k]})] = true;
      |              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~