Borderou de evaluare (job #2189002)

Utilizator claudiu.gatinaFMI Claudiu Gatina claudiu.gatina Data 27 martie 2018 16:55:43
Problema Diametrul unui arbore Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:6:7: error: expected nested-name-specifier before ‘napespace’ using napespace std; ^~~~~~~~~ user.cpp:11:2: error: ‘vector’ does not name a type vector<int> adjList[100001]; ^~~~~~ user.cpp: In member function ‘void Graf::add(int, int)’: user.cpp:28:3: error: ‘adjList’ was not declared in this scope adjList[a].push_back(b); ^~~~~~~ user.cpp: In member function ‘int Graf::mDistantaCeaMaiMare(int&)’: user.cpp:34:3: error: ‘vector’ was not declared in this scope vector<int> v(n, 0); ^~~~~~ user.cpp:34:3: note: suggested alternative: In file included from /usr/include/c++/6/vector:64:0, from user.cpp:3: /usr/include/c++/6/bits/stl_vector.h:214:11: note: ‘std::vector’ class vector : protected _Vector_base<_Tp, _Alloc> ^~~~~~ user.cpp:34:10: error: expected primary-expression before ‘int’ vector<int> v(n, 0); ^~~ user.cpp:35:10: error: expected primary-expression before ‘int’ vector<int> d(n, 0); ^~~ user.cpp:36:3: error: ‘v’ was not declared in this scope v[start] = 1; ^ user.cpp:39:3: error: ‘queue’ was not declared in this scope queue BFS; ^~~~~ user.cpp:39:3: note: suggested alternative: In file included from /usr/include/c++/6/queue:64:0, from user.cpp:4: /usr/include/c++/6/bits/stl_queue.h:96:11: note: ‘std::queue’ class queue ^~~~~ user.cpp:40:3: error: ‘BFS’ was not declared in this scope BFS.push(start); ^~~ user.cpp:44:23: error: ‘adjList’ was not declared in this scope for(int i = 0; i < adjList[nodCurent].size(); ++i) ^~~~~~~ user.cpp:50:6: error: ‘d’ was not declared in this scope d[nodUrmator] = d[nodCurent] + 1; ^ user.cpp: In member function ‘int Graf::diametru()’: user.cpp:66:7: warning: unused variable ‘nod’ [-Wunused-variable] int nod = mDistantaCeaMaiMare(start);

Ceva nu functioneaza?