Borderou de evaluare (job #3160901)

Utilizator Edwin_CalinCalin Edwin Cristian Edwin_Calin Data 25 octombrie 2023 11:19:33
Problema Problema rucsacului Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:6:13: error: variable 'std::ifstream fin' has initializer but incomplete type 6 | ifstream fin("rucsac.in"); | ^ main.cpp:7:14: error: variable 'std::ofstream fout' has initializer but incomplete type 7 | ofstream fout("rucsac.out"); | ^ main.cpp: In function 'int dp_profit(int, int, t_object*)': main.cpp:32:5: error: expected unqualified-id before 'new' 32 | int new capacitate=capacitate-objs[idx].greutate; | ^~~ main.cpp:33:46: error: 'new_capacitate' was not declared in this scope; did you mean 'capacitate'? 33 | int profit2=objs[idx].profit+dp_profit(idx-1,new_capacitate,objs); | ^~~~~~~~~~~~~~ | capacitate main.cpp: In function 'int main()': main.cpp:54:5: error: 't_oject' was not declared in this scope; did you mean 't_object'? 54 | t_oject obs={greutate,profit}; | ^~~~~~~ | t_object main.cpp:55:13: error: 'obj' was not declared in this scope; did you mean 'objs'? 55 | objs[i]=obj; | ^~~ | objs Non zero exit status: 1

Ceva nu functioneaza?