#4781
Se dă lista muchiilor unui graf neorientat. Să se afișeze componentele conexe ale acestui graf.
| Problema | ComponenteConexe6 | Operații I/O |
componenteconexe6.in/componenteconexe6.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63930680 | Utilizator | |
| Fișier | componenteconexe6.cpp | Dimensiune | 754 B |
| Data încărcării | 27 Martie 2026, 11:19 | Scor/rezultat | Eroare de compilare |
componenteconexe6.cpp: In function 'int bfs(int, int)': componenteconexe6.cpp:11:3: error: expected ';' before 'int' int i,k,st,dr; ^ componenteconexe6.cpp: In function 'int main()': componenteconexe6.cpp:36:6: error: 'nod' was not declared in this scope {nod=i; ^ componenteconexe6.cpp:38:5: error: 'nod' was not declared in this scope if (nod!=0) ^ componenteconexe6.cpp:40:5: error: 'nr' was not declared in this scope nr++; ^ componenteconexe6.cpp:43:1: error: expected ';' before '}' token }} while(nod!=0) ^ componenteconexe6.cpp:43:10: error: 'nod' was not declared in this scope }} while(nod!=0) ^ componenteconexe6.cpp:44:1: error: expected ';' before 'g' g<<nr<<endl; ^ componenteconexe6.cpp:44:4: error: 'nr' was not declared in this scope g<<nr<<endl; ^ componenteconexe6.cpp:46:10: warning: statement has no effect [-Wunused-value] for(j==1;j<=m;j++) ^ componenteconexe6.cpp:46:17: error: 'm' was not declared in this scope for(j==1;j<=m;j++) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe6 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.