Borderou de evaluare (job #1652550)

Utilizator isabela-oanceaOancea Maria Isabela isabela-oancea Data 15 martie 2016 00:29:27
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:9:17: error: ‘N’ was not declared in this scope scanf("%d%d", &N, &G); ^ user.cpp:9:21: error: ‘G’ was not declared in this scope scanf("%d%d", &N, &G); ^ user.cpp:11:18: error: ‘W’ was not declared in this scope scanf("%d%d", &W[i], &P[i]); ^ user.cpp:11:25: error: ‘P’ was not declared in this scope scanf("%d%d", &W[i], &P[i]); ^ user.cpp:16:3: error: ‘D’ was not declared in this scope D[1 - l][cw] = D[l][cw]; ^ user.cpp:17:7: error: ‘W’ was not declared in this scope if (W[i] <= cw) ^ user.cpp:18:60: error: ‘max’ was not declared in this scope D[1 - l][cw] = max(D[1 - l][cw], D[l][cw - W[i]] 9+ P[i]); ^ user.cpp:18:60: note: suggested alternative: In file included from /usr/include/c++/4.8/algorithm:62:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4259:5: note: ‘std::max’ max(initializer_list<_Tp> __l, _Compare __comp) ^ user.cpp:21:2: error: ‘Pmax’ was not declared in this scope Pmax = D[l][G]; ^ user.cpp:21:9: error: ‘D’ was not declared in this scope Pmax = D[l][G]; ^ user.cpp:5:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("rucsac.in", "r", stdin); ^ user.cpp:6:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("rucsac.out", "w", stdout); ^

Ceva nu functioneaza?