Borderou de evaluare (job #2715944)

Utilizator maria.rotaruMaria Rotaru maria.rotaru Data 4 martie 2021 13:31:11
Problema Paduri de multimi disjuncte Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void sef_suprem(int)': main.cpp:14:16: error: return-statement with a value, in function returning 'void' [-fpermissive] return nod; ^~~ main.cpp:15:42: error: void value not ignored as it ought to be return sef[nod] = sef_suprem(sef[nod]); ^ main.cpp:15:42: error: return-statement with a value, in function returning 'void' [-fpermissive] main.cpp: In function 'void unire(int, int)': main.cpp:20:29: error: void value not ignored as it ought to be int sef_a = sef_suprem(a); ^ main.cpp:21:29: error: void value not ignored as it ought to be int sef_b = sef_suprem(b); ^ main.cpp: In function 'int main()': main.cpp:29:5: error: expected ';' before 'for' for (int i=1; i<=n; i++) ^~~ main.cpp:29:19: error: 'i' was not declared in this scope for (int i=1; i<=n; i++) ^ main.cpp:38:31: error: invalid operands of types 'void' and 'void' to binary 'operator==' if (sef_suprem(x) == sef_suprem(y)) ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?