Problem GSS
User Hijackedsoul
Submission Time 2023-07-20 09:12:45
Score 0
Max Time N/A
Max Memory N/A

Compile Error

GSS.cpp: In function ‘int main()’:
GSS.cpp:16: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> >’)
16 | 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,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from GSS.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:856:7: note: candidate: ‘__gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_c