Problem GSS
User Hijackedsoul
Submission Time 2023-07-20 13:58:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

GSS.cpp: In function ‘int main()’:
GSS.cpp:16:15: error: invalid use of member function ‘std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’ (did you forget the ‘()’ ?)
16 | while (price.size > 3){
| ~~~~~~^~~~
| ()
GSS.cpp:17:30: error: no match for ‘operator+’ (operand types are ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ and ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’)
17 | ans = ans + (price.end()-3) + (price.end()-2) + (price.end()-1)
| ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
| | |
| __normal_iterator<[...],[...]> __normal_iterator<[...],[...]>
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,