Borderou de evaluare (job #2202635)

Utilizator catalinmatei13Stan Catalin catalinmatei13 Data 9 mai 2018 16:14:16
Problema Problema rucsacului Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:17:13: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) f>>c[i]>>g[i]; ^ user.cpp:22:19: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) if( c[o[i]] / g[o[i]] < c[o[ i + 1 ]] / g[o[ i + 1 ]] ){ ^ user.cpp:22:45: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) if( c[o[i]] / g[o[i]] < c[o[ i + 1 ]] / g[o[ i + 1 ]] ){ ^ user.cpp:28:33: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) for(i=0 , Gr=GMax ; i<n && Gr>g[o[i]] ; i++){ ^ user.cpp:29:20: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) x[o[i]]=1; Gr-=g[o[i]]; ^ user.cpp:31:26: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) if( i<n ) x[o[i]] = Gr/g[o[i]]; ^

Ceva nu functioneaza?