Borderou de evaluare (job #1237017)

Utilizator ELHoriaHoria Cretescu ELHoria Data 2 octombrie 2014 23:29:38
Problema Paduri de multimi disjuncte Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:6:3: error: ‘vector’ does not name a type vector<int> parent; ^ user.cpp: In member function ‘void DSU::compressPaths(const int&, const int&)’: user.cpp:10:25: error: ‘parent’ was not declared in this scope for (int v = x; v != parent[v]; ) { ^ user.cpp: In member function ‘int DSU::find(const int&)’: user.cpp:18:16: error: ‘parent’ was not declared in this scope return x != parent[x]) ? find(parent[x]) : return x; ^ user.cpp:18:25: error: expected ‘;’ before ‘)’ token return x != parent[x]) ? find(parent[x]) : return x; ^ user.cpp:18:25: error: expected primary-expression before ‘)’ token user.cpp:18:25: error: expected ‘;’ before ‘)’ token user.cpp: In constructor ‘DSU::DSU(int)’: user.cpp:34:4: error: ‘parent’ was not declared in this scope parent.resize(size); ^ user.cpp: In member function ‘void DSU::unite(const int&, const int&)’: user.cpp:42:4: error: ‘parent’ was not declared in this scope parent[find(b, true)] = find(a, true); ^ user.cpp: In member function ‘int DSU::find(const int&)’: user.cpp:19:3: warning: control reaches end of non-void function [-Wreturn-type] } ^

Ceva nu functioneaza?