QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#365099#5107. Mosaic BrowsingwaifuSenpaiCompile Error//C++201.6kb2024-03-24 19:37:242024-03-24 19:37:25

詳細信息

answer.code: In function ‘int main()’:
answer.code:48:14: error: no matching function for call to ‘max(<brace-enclosed initializer list>)’
   48 |    assert(max({QY, QX, PX, PY}) <= 500);
      |           ~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/bitset:49,
                 from answer.code:1:
/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:48:14: note:   candidate expects 2 arguments, 1 provided
   48 |    assert(max({QY, QX, PX, PY}) <= 500);
      |           ~~~^~~~~~~~~~~~~~~~~~
/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:48:14: note:   candidate expects 3 arguments, 1 provided
   48 |    assert(max({QY, QX, PX, PY}) <= 500);
      |           ~~~^~~~~~~~~~~~~~~~~~
answer.code:48:4: error: ‘assert’ was not declared in this scope
   48 |    assert(max({QY, QX, PX, PY}) <= 500);
      |    ^~~~~~
answer.code:4:1: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
    3 | #include <vector>
  +++ |+#include <cassert>
    4 | using namespace std;