Problem | knapsack |
---|---|
User | AJigglypuffCoder |
Submission Time | 2025-02-03 20:06:51 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
knapsack.cpp: In function ‘int main()’:
knapsack.cpp:43:16: error: ‘__gnu_cxx::__alloc_traits<std::allocator<item_type>, item_type>::value_type’ {aka ‘struct item_type’} has no member named ‘emplace_back’
43 | items[i].emplace_back(it);
| ^~~~~~~~~~~~
knapsack.cpp:57:41: error: request for member ‘items’ in ‘j’, which is of non-class type ‘int’
57 | tmp[j] = (old_tmp[j-items[i].W]-j.items[i].V)>old_tmp[j] ? old_tmp[j-items[i].W]-j.items[i].V : old_tmp[j];
| ^~~~~
knapsack.cpp:57:90: error: request for member ‘items’ in ‘j’, which is of non-class type ‘int’
57 | tmp[j] = (old_tmp[j-items[i].W]-j.items[i].V)>old_tmp[j] ? old_tmp[j-items[i].W]-j.items[i].V : old_tmp[j];
| ^~~~~
knapsack.cpp:61:8: error: no match for ‘operator<<’ (operand types are ‘s