Problem taxcollection
User Henries
Submission Time 2024-10-13 11:35:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

taxcollection.cpp: In function ‘void solve(std::vector<std::pair<long long int, long long int> >)’:
taxcollection.cpp:17:21: error: cannot convert ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type’ {aka ‘std::pair<long long int, long long int>’} to ‘__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type’ {aka ‘long long int’} in assignment
17 | prefixsums[0] = v[0];
| ^
taxcollection.cpp:18:18: error: ‘n’ was not declared in this scope
18 | for (int i =1;i<n;i++){
| ^
taxcollection.cpp:19:24: error: no match for ‘operator+’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type’ {aka ‘std::pair<long long int,