| Problem | sumint |
|---|---|
| User | user123 |
| Submission Time | 2026-03-12 18:21:18 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
sumint.cpp: In function ‘int main()’:
sumint.cpp:10:25: error: no matching function for call to ‘accumulate(int [N], int*)’
10 | cout<<accumulate(A, A+N)<<endl;
| ^
In file included from /usr/include/c++/9/numeric:62,
from sumint.cpp:3:
/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:
sumint.cpp:10:25: note: candidate expects 3 arguments, 2 provided
10 | cout<<accumulate(A, A+N)<<endl;
| ^
In file included from /usr/include/c++/9/numeric:62,
from sumint.cpp:3:
/usr/include/c++/9/bits/stl_numeric