Problem knapsack
User Karax
Submission Time 2026-06-17 18:58:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knapsack.cpp: In function ‘int main()’:
knapsack.cpp:21:40: error: ‘S’ was not declared in this scope
21 | for (int j = 0; r + j*w <= S; j++) {
| ^