Problem knapsack
User AJigglypuffCoder
Submission Time 2025-02-03 15:59:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knapsack.cpp: In function ‘int maxVal(std::vector<item_type>, int, int)’:
knapsack.cpp:47:45: error: expected ‘;’ before ‘tVal’
47 | tTMaxNoAccToWL = weight_left / its2[i].W
| ^
| ;
48 |
49 | tVal = its2[i].V*(tTMaxNoAccToWL>its2[i].K?its2[i].K:tTMaxNoAccToWL) + maxVal(its2, weight_left-(tTMaxNoAccToWL>its2[i].K?its2[i].K:tTMaxNoAccToWL), i);
| ~~~~