Problem doll_noi
User personjs
Submission Time 2025-02-05 16:07:44
Score 0
Max Time N/A
Max Memory N/A

Compile Error

doll_noi.cpp:1:32: error: ‘vector’ has not been declared
1 | int knapSack(int capacity, vector<int> &val, vector<int> &wt) {
| ^~~~~~
doll_noi.cpp:1:38: error: expected ‘,’ or ‘...’ before ‘<’ token
1 | int knapSack(int capacity, vector<int> &val, vector<int> &wt) {
| ^
doll_noi.cpp: In function ‘int knapSack(int, int)’:
doll_noi.cpp:2:17: error: ‘val’ was not declared in this scope
2 | int n = val.size();
| ^~~
doll_noi.cpp:3:9: error: ‘vector’ was not declared in this scope
3 | vector<int> f(capacity + 1, 0);
| ^~~~~~
doll_noi.cpp:3:16: error: expected primary-expression before ‘int’
3 | vector<int> f(capacity + 1, 0);
| ^~~
doll_noi.cpp:5:37: error: ‘wt’ was not declared in this scope; did you mean ‘w’?
5