Borderou de evaluare (job #3316744)

Utilizator Mirc100Mircea Octavian Mirc100 Data 20 octombrie 2025 14:42:26
Problema BFS - Parcurgere in latime Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:8:75: error: declaration of 'l_adj' as array of references 8 | void citire(const char *nume_fisier, int &n, int &m, int &s, vector<int> &l_adj[]){ | ^~~~~ main.cpp: In function 'void citire(...)': main.cpp:9:17: error: 'nume_fisier' was not declared in this scope 9 | ifstream f(nume_fisier); | ^~~~~~~~~~~ main.cpp:15:10: error: 'l' was not declared in this scope 15 | l[x-1].push_back(y-1); | ^ main.cpp: In function 'void bfs(int)': main.cpp:31:28: error: 'l' was not declared in this scope 31 | for(auto y:l[x]){ | ^ main.cpp:21:15: warning: unused variable 'i' [-Wunused-variable] 21 | int x,i; | ^ main.cpp: In function 'int main()': main.cpp:42:27: error: 'l' was not declared in this scope 42 | citire("bfs.in",n,m,s,l); | ^ main.cpp:44:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation] 44 | for(i=0;i<n;i++) | ^~~ main.cpp:47:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for' 47 | bfs(s); | ^~~ Non zero exit status: 1

Ceva nu functioneaza?