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

Compile Error

knapsack.cpp: In function ‘int main()’:
knapsack.cpp:15: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’
15 | v[W].push_back({V, K});
| ^~~~~~~~~
knapsack.cpp:19: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’
19 | sort(v[i].begin(), v[i].end());
| ^~~~~
knapsack.cpp:19: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’
19 | sort(v[i].begin(), v[i].end());
| ^~~
knapsack.cpp:20:16: error: ‘__gnu_cxx::__alloc_traits<std::