Problem 4russians
User PlayVoltz
Submission Time 2023-09-01 23:36:06
Score 0
Max Time N/A
Max Memory N/A

Compile Error

4russians.cpp: In function ‘long long int russian(long long int, long long int, bool)’:
4russians.cpp:17:25: error: cannot convert ‘__gnu_cxx::__alloc_traits<std::allocator<std::vector<long long int> >, std::vector<long long int> >::value_type’ {aka ‘std::vector<long long int>’} to ‘long long int’ in return
17 | return dp[index][count];
| ^
4russians.cpp:29:123: error: no matching function for call to ‘max(__gnu_cxx::__alloc_traits<std::allocator<std::vector<long long int> >, std::vector<long long int> >::value_type&, const long long int&)’
29 | dp[index][count] = max(dp[index][count], max(maxnum, russian(index+1, count, 0)-cats[index]*cats[index+1]+smurfs[index]));
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,