Borderou de evaluare (job #1275573)
Utilizator | Data | 25 noiembrie 2014 13:04:25 | |
---|---|---|---|
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:20:10: error: ‘n’ was not declared in this scope
fin>>n>>g;
^
user.cpp:20:13: error: ‘g’ was not declared in this scope
fin>>n>>g;
^
user.cpp:21:10: error: ‘i’ was not declared in this scope
for (i=1;i<=n;i++) {
^
user.cpp:22:14: error: ‘G’ was not declared in this scope
fin>>G[i]>>P[i];
^
user.cpp:22:20: error: ‘P’ was not declared in this scope
fin>>G[i]>>P[i];
^
user.cpp:26:10: error: ‘i’ was not declared in this scope
for (i=1;i<=g;i++)
^
user.cpp:27:9: error: ‘d’ was not declared in this scope
d[i] = INF;
^
user.cpp:28:5: error: ‘d’ was not declared in this scope
d[0] = 0;
^
user.cpp:29:10: error: ‘i’ was not declared in this scope
for (i=1;i<=n;i++) {
^
user.cpp:30:14: error: ‘j’ was not declared in this scope
for (j=g;j>=0;j--)
^
user.cpp:32:25: error: ‘G’ was not declared in this scope
if (j + G[i] <= g) {
^
user.cpp:33:55: error: ‘P’ was not declared in this scope
d[j+G[i]] = max(d[j+G[i]], d[j] + P[i]);
^
user.cpp:34:21: error: ‘sol’ was not declared in this scope
sol = max (sol, d[j+G[i]]);
^
user.cpp:39:13: error: ‘sol’ was not declared in this scope
fout << sol;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !