Problem lunchbox
User Helloworld
Submission Time 2026-02-12 22:25:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:16:11: error: ‘min_element’ was not declared in this scope
16 | x += min_element(num.begin(),num.end());
| ^~~~~~~~~~~
lunchbox.cpp:17:14: error: ‘class std::vector<int>’ has no member named ‘find’
17 | p = num.find(num.start(),num.end(),min_element(num.begin(),num.end()));
| ^~~~
lunchbox.cpp:17:23: error: ‘class std::vector<int>’ has no member named ‘start’
17 | p = num.find(num.start(),num.end(),min_element(num.begin(),num.end()));
| ^~~~~
lunchbox.cpp:18:29: error: no matching function for call to ‘std::vector<int>::erase(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)’
18 | num.erase(num[p],num[p]);
| ^
In file included from /usr/include/c+