Problem supermarket
User Duk168
Submission Time 2024-09-30 00:31:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

supermarket.cpp: In function ‘int main()’:
supermarket.cpp:32:28: error: invalid conversion from ‘std::ios_base& (*)(std::ios_base&)’ to ‘std::vector<std::pair<int, int> >::size_type’ {aka ‘long unsigned int’} [-fpermissive]
32 | cur_w -= mushy[left].second;
| ^~~~
| |
| std::ios_base& (*)(std::ios_base&)
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from supermarket.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1040:28: note: initializing argument 1 of ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector&