QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#794646#9790. Make Swamp Great Againucup-team3194#Compile Error//C++141.0kb2024-11-30 15:21:432024-11-30 15:21:48

详细

answer.code: In function ‘bool check(int, int, int)’:
answer.code:18:17: error: no matching function for call to ‘min(<brace-enclosed initializer list>)’
   18 |     int mn = min({cur, a, b}), mx = max({cur, a, b});
      |              ~~~^~~~~~~~~~~~~
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:18:17: note:   candidate expects 2 arguments, 1 provided
   18 |     int mn = min({cur, a, b}), mx = max({cur, a, b});
      |              ~~~^~~~~~~~~~~~~
/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:18:17: note:   candidate expects 3 arguments, 1 provided
   18 |     int mn = min({cur, a, b}), mx = max({cur, a, b});
      |              ~~~^~~~~~~~~~~~~
answer.code:19:33: error: ‘mx’ was not declared in this scope; did you mean ‘mn’?
   19 |     return (cur == mn || cur == mx);
      |                                 ^~
      |                                 mn