#438
Se dă lista muchiilor unui graf neorientat. Să se afișeze componentele conexe ale acestui graf.
| Problema | ComponenteConexe | Operații I/O |
componenteconexe.in/componenteconexe.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62844096 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 653 B |
| Data încărcării | 04 Februarie 2026, 08:33 | Scor/rezultat | Eroare de compilare |
componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:26:22: error: 'k' was not declared in this scope if (v[i]==0) k++, dfs(i,k); ^ componenteconexe.cpp:28:9: error: 'k' was not declared in this scope g << k << '\n'; ^ componenteconexe.cpp:31:17: error: 'c' was not declared in this scope if (c[i]==i) g << j <<" "; ^ componenteconexe.cpp:20:12: warning: unused variable 'm' [-Wunused-variable] int i,j,m,s=0; ^ componenteconexe.cpp:20:14: warning: unused variable 's' [-Wunused-variable] int i,j,m,s=0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe 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ă.