Problem candles
User asbx
Submission Time 2023-11-24 09:49:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

candles.cpp: In function ‘int main()’:
candles.cpp:22:22: error: invalid use of non-static member function ‘std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
22 | for(int i=max(k,neg.size); i>=min(k-pos.size(),0); i--){
| ~~~~^~~~
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 candles.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:915:7: note: declared here
915 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
candles.cpp:22:50: error: no matching function for