Problem | competition |
---|---|
User | nutzzzz |
Submission Time | 2025-02-01 09:15:56 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
competition.cpp: In function ‘int main()’:
competition.cpp:40:49: error: no matching function for call to ‘accumulate(std::vector<int>::iterator, std::vector<int>::iterator)’
40 | int suma = std::accumulate(va.begin(), va.end());
| ^
In file included from /usr/include/c++/9/numeric:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:84,
from competition.cpp:1:
/usr/include/c++/9/bits/stl_numeric.h:132:5: note: candidate: ‘template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)’
132 | accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
| ^~~~~~~~~~
/usr/include/c++/9/bits/stl_numeric.h:132:5: note: template argument deduction/substitution failed:
competition.cpp:40:49: note: candidate expects 3 arguments, 2 provided
40 | int suma = std::accumulate(va.be