Borderou de evaluare (job #3281529)

Utilizator UengineDavid Enachescu Uengine Data 2 martie 2025 02:03:03
Problema Paduri de multimi disjuncte Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:9:1: error: 'vector' does not name a type 9 | vector<int> root(N), depth(N); | ^~~~~~ main.cpp: In function 'int find_root(int)': main.cpp:12:9: error: 'root' was not declared in this scope 12 | if (root[nod] == nod) | ^~~~ main.cpp:14:12: error: 'root' was not declared in this scope 14 | return root[nod] = find_root(root[nod]); | ^~~~ main.cpp: In function 'void unite(int, int)': main.cpp:20:9: error: 'depth' was not declared in this scope 20 | if (depth[node2] < depth[node1]) | ^~~~~ main.cpp:21:9: error: 'root' was not declared in this scope 21 | root[node2] = node1; | ^~~~ main.cpp:23:9: error: 'root' was not declared in this scope 23 | root[node1] = node2; | ^~~~ main.cpp:25:9: error: 'root' was not declared in this scope 25 | root[node1] = node2; | ^~~~ main.cpp: In function 'int main()': main.cpp:33:5: error: 'depth' was not declared in this scope 33 | depth.assign(n + 1, 1); | ^~~~~ main.cpp:35:9: error: 'root' was not declared in this scope 35 | root[i] = i; | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?