Problem knapsack
User hwy
Submission Time 2023-07-26 21:09:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knapsack.cpp: In function ‘int main()’:
knapsack.cpp:13:8: error: ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type’ {aka ‘struct std::pair<int, int>’} has no member named ‘push_back’
13 | v[W].push_back({V, K});
| ^~~~~~~~~
knapsack.cpp:17:13: error: ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type’ {aka ‘struct std::pair<int, int>’} has no member named ‘begin’
17 | sort(v[i].begin(), v[i].end());
| ^~~~~
knapsack.cpp:17:27: error: ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type’ {aka ‘struct std::pair<int, int>’} has no member named ‘end’
17 | sort(v[i].begin(), v[i].end());
| ^~~
knapsack.cpp:18:16: error: ‘__gnu_cxx::__alloc_traits<std::