Borderou de evaluare (job #2844744)

Utilizator BarbuceanuConstantinBarbuceanu Constantin BarbuceanuConstantin Data 5 februarie 2022 12:20:05
Problema Parantezare optima de matrici Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:9:17: error: expected ']' before ';' token 9 | #define MAXN 510; | ^ main.cpp:11:17: note: in expansion of macro 'MAXN' 11 | long long table[MAXN][MAXN], dims[MAXN]; int n; | ^~~~ main.cpp:11:21: error: expected unqualified-id before ']' token 11 | long long table[MAXN][MAXN], dims[MAXN]; int n; | ^ main.cpp:11:27: error: expected unqualified-id before ']' token 11 | long long table[MAXN][MAXN], dims[MAXN]; int n; | ^ main.cpp:11:39: error: expected unqualified-id before ']' token 11 | long long table[MAXN][MAXN], dims[MAXN]; int n; | ^ main.cpp: In function 'int main()': main.cpp:22:39: error: 'dims' was not declared in this scope 22 | for(int i = 0; i <= n; ++i) in >> dims[i]; | ^~~~ main.cpp:23:37: error: 'table' was not declared in this scope; did you mean 'mutable'? 23 | for(int i = 1; i <= n - 1; ++i) table[i][i + 1] = dims[i - 1] * dims[i] * dims[i + 1]; | ^~~~~ | mutable main.cpp:23:55: error: 'dims' was not declared in this scope 23 | for(int i = 1; i <= n - 1; ++i) table[i][i + 1] = dims[i - 1] * dims[i] * dims[i + 1]; | ^~~~ main.cpp:28:13: error: 'table' was not declared in this scope; did you mean 'mutable'? 28 | table[i][j] = LLONG_MAX; | ^~~~~ | mutable main.cpp:30:84: error: 'dims' was not declared in this scope 30 | table[i][j] = minimum(table[i][j], table[i][k] + table[k + 1][j] + dims[i - 1] * dims[k] * dims[j]); | ^~~~ main.cpp:35:12: error: 'table' was not declared in this scope; did you mean 'mutable'? 35 | out << table[1][n]; | ^~~~~ | mutable Non zero exit status: 1

Ceva nu functioneaza?