Borderou de evaluare (job #3209154)
Utilizator | Data | 2 martie 2024 07:07:22 | |
---|---|---|---|
Problema | Problema rucsacului | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:20:5: error: 'dp' was not declared in this scope; did you mean 'dup'?
20 | dp.resize(W + 1, std::vector<int>(n + 1, 0));
| ^~
| dup
main.cpp:33:84: error: expected ';' before 'max_profit'
33 | total_profit[w + objs[i].weight] = total_profit[w] + objs[i].profit
| ^
| ;
34 | max_profit = std::max(max_profit, total_profit[w + objs[i].weight]);
| ~~~~~~~~~~
main.cpp:11:9: warning: unused variable 'max_profit' [-Wunused-variable]
11 | int max_profit = 0;
| ^~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !