QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#665432 | #6130. Plants vs. Zombies | ucup-team5375# | Compile Error | / | / | C++20 | 1.2kb | 2024-10-22 12:41:12 | 2024-10-22 12:41:13 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘void solve()’: answer.code:14:45: error: no matching function for call to ‘max_element(std::vector<int>&)’ 14 | ll ans = 0, l = 1, r = m * (*max_element(a)); | ~~~~~~~~~~~^~~ In file included from /usr/include/c++/13/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from answer.code:1: /usr/include/c++/13/bits/stl_algo.h:5730:5: note: candidate: ‘template<class _FIter> constexpr _FIter std::max_element(_FIter, _FIter)’ 5730 | max_element(_ForwardIterator __first, _ForwardIterator __last) | ^~~~~~~~~~~ /usr/include/c++/13/bits/stl_algo.h:5730:5: note: template argument deduction/substitution failed: answer.code:14:45: note: candidate expects 2 arguments, 1 provided 14 | ll ans = 0, l = 1, r = m * (*max_element(a)); | ~~~~~~~~~~~^~~ /usr/include/c++/13/bits/stl_algo.h:5755:5: note: candidate: ‘template<class _FIter, class _Compare> constexpr _FIter std::max_element(_FIter, _FIter, _Compare)’ 5755 | max_element(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~~~~~~ /usr/include/c++/13/bits/stl_algo.h:5755:5: note: template argument deduction/substitution failed: answer.code:14:45: note: candidate expects 3 arguments, 1 provided 14 | ll ans = 0, l = 1, r = m * (*max_element(a)); | ~~~~~~~~~~~^~~ In file included from /usr/include/c++/13/algorithm:73: /usr/include/c++/13/pstl/glue_algorithm_defs.h:524:1: note: candidate: ‘template<class _ExecutionPolicy, class _ForwardIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::max_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare)’ 524 | max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); | ^~~~~~~~~~~ /usr/include/c++/13/pstl/glue_algorithm_defs.h:524:1: note: template argument deduction/substitution failed: answer.code:14:45: note: candidate expects 4 arguments, 1 provided 14 | ll ans = 0, l = 1, r = m * (*max_element(a)); | ~~~~~~~~~~~^~~ /usr/include/c++/13/pstl/glue_algorithm_defs.h:528:1: note: candidate: ‘template<class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::max_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator)’ 528 | max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); | ^~~~~~~~~~~ /usr/include/c++/13/pstl/glue_algorithm_defs.h:528:1: note: template argument deduction/substitution failed: answer.code:14:45: note: candidate expects 3 arguments, 1 provided 14 | ll ans = 0, l = 1, r = m * (*max_element(a)); | ~~~~~~~~~~~^~~