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

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:17:11: error: cannot convert ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ to ‘long long int’ in assignment
17 | x = x+min_element(num.begin(),num.end());
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| __gnu_cxx::__normal_iterator<int*, std::vector<int> >
lunchbox.cpp:18:14: error: ‘class std::vector<int>’ has no member named ‘find’
18 | p = num.find(num.start(),num.end(),min_element(num.begin(),num.end()));
| ^~~~
lunchbox.cpp:18:23: error: ‘class std::vector<int>’ has no member named ‘start’
18 | p = num.find(num.start(),num.end(),min_element(num.begin(),num.end()));
| ^~~~~
lunchbox.cpp:19:29: error: no matching function for call to ‘std::vector<int>::erase(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_typ