knapsack.cpp: In function 'int main()':
knapsack.cpp:9:12: error: 'll' was not declared in this scope
9 | vector<ll> dp(W + 1, 0);
| ^~
knapsack.cpp:9:14: error: template argument 1 is invalid
9 | vector<ll> dp(W + 1, 0);
| ^
knapsack.cpp:9:14: error: template argument 2 is invalid
knapsack.cpp:9:27: error: expression list treated as compound expression in initializer [-fpermissive]
9 | vector<ll> dp(W + 1, 0);
| ^
knapsack.cpp:22:19: error: invalid types 'int[int]' for array subscript
22 | dp[j] = max(dp[j], dp[j - weight] + value);
| ^
knapsack.cpp:22:31: error: invalid types 'int[int]' for array subscript
22 | dp[j] = max(dp[j], dp[j - weight] + value);
| ^
knapsack.cpp:22:38: error: invalid types 'int[int]' for array subscript
22 | dp[j] = max(dp[j], dp[j - weight] + value);
| ^
knapsack.cpp:27:15: error: invalid types 'int[int]' for array subscript
27 | cout << dp[W] << endl;
| ^