Borderou de evaluare (job #1907176)

Utilizator 1475369147896537415369Andrei Udriste 1475369147896537415369 Data 6 martie 2017 18:08:47
Problema Algoritmul Bellman-Ford Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:19:1: error: expected initializer before ‘int’ int predecessor[50001]; ^ user.cpp: In function ‘int BellmanFord(int)’: user.cpp:26:9: error: ‘dist’ was not declared in this scope dist[node] = infinity; ^ user.cpp:27:9: error: ‘predecessor’ was not declared in this scope predecessor[node] = NULL; ^ user.cpp:28:6: error: ‘dist’ was not declared in this scope }dist[source] = 0; ^ user.cpp:40:21: error: ‘predecessor’ was not declared in this scope predecessor[v] = u; ^ user.cpp: In function ‘int main()’: user.cpp:76:23: error: ‘dist’ was not declared in this scope printf("%d ", dist[node]); ^ user.cpp:62:42: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("bellmanford.in", "r", stdin); ^ user.cpp:63:44: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("bellmanford.out", "w", stdout); ^ user.cpp:65:38: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d", &vertices, &edges); ^ user.cpp:68:43: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d %d", &u, &v, &weight); ^

Ceva nu functioneaza?