Borderou de evaluare (job #2060951)
Utilizator | Data | 8 noiembrie 2017 20:13:24 | |
---|---|---|---|
Problema | Problema rucsacului | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:9:23: error: conflicting declaration ‘int g [5010]’
int n,smax,gmax,g[nmax],v[nmax],dp[2][nmax];
^
user.cpp:7:10: error: ‘g’ has a previous declaration as ‘std::ofstream g’
ofstream g("rucsac.out");
^
user.cpp: In function ‘int main()’:
user.cpp:15:13: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
f>>g[i]>>v[i];
^
user.cpp:19:18: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
if (g[i]>j)
^
user.cpp:22:48: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
dp[1][j]=max(dp[0][j],dp[0][j-g[i]]+v[i]);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !