Problem duckhunt24
User smartsword
Submission Time 2025-12-10 09:53:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt24.cpp: In function ‘int main()’:
duckhunt24.cpp:19:41: error: expected ‘;’ before ‘cout’
19 | partial_sum(arr[0],arr[n - 1], arr[v])
| ^
| ;
20 |
21 | cout << ans << ' ';
| ~~~~
In file included from /usr/include/c++/9/numeric:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:84,
from duckhunt24.cpp:1:
/usr/include/c++/9/bits/stl_numeric.h: In instantiation of ‘_OutputIterator std::partial_sum(_InputIterator, _InputIterator, _OutputIterator) [with _InputIterator = long long int; _OutputIterator = long long int]’:
duckhunt24.cpp:19:40: required from here
/usr/include/c++/9/bits/stl_numeric.h:253:68: error: no type named ‘value_type’ in ‘struct std::iterator_traits<long long int>’
253 | typedef typename iterator_traits<