Problem lunchbox
User OMW
Submission Time 2024-04-08 18:01:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:16:23: error: no matching function for call to ‘min_element(int [M])’
16 | if (min_element(list)) <= N){
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from lunchbox.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:5649:12: note: candidate: ‘template<class _FIter> constexpr _FIter std::min_element(_FIter, _FIter)’
5649 | inline min_element(_ForwardIterator __first, _ForwardIterator __last)
| ^~~~~~~~~~~
/usr/include/c++/9/bits/stl_algo.h:5649:12: note: template argument deduction/substitution failed:
lunchbox.cpp:16:23: note: candidate expects 2 arguments, 1 provided
16 | if (min_element(list)) <= N){
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/inclu