prize.cpp: In function 'std::vector<int> K(int)':
prize.cpp:7:12: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
7 | if(memo[i][0] != -1) return memo[i];
| ^
prize.cpp:7:36: error: could not convert 'memo.std::vector<int>::operator[](((std::vector<int>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'std::vector<int>'
7 | if(memo[i][0] != -1) return memo[i];
| ^
| |
| __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}
prize.cpp: In function 'int find_best(int)':
prize.cpp:12:25: error: no matching function for call to 'std::vector<int>::resize(int&, <brace-enclosed initializer list>)'
12 | memo.resize(N, {-1, -1});
| ^
In file included from /usr/include/c++/10/vector:67,
from prize.h:1,
from prize.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:937:7: note: candidate: 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
937 | resize(size_type __new_size)
| ^~~~~~
/usr/include/c++/10/bits/stl_vector.h:937:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/10/bits/stl_vector.h:957:7: note: candidate: 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = int]'
957 | resize(size_type __new_size, const value_type& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_vector.h:957:54: note: no known conversion for argument 2 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const int&'}
957 | resize(size_type __new_size, const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~