#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 | #61788426 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 783 B |
| Data încărcării | 10 Decembrie 2025, 10:19 | Scor/rezultat | Eroare de compilare |
componenteconexe.cpp: In function 'void BFS(int)': componenteconexe.cpp:9:5: error: 'st' was not declared in this scope st=dr=1; ^ componenteconexe.cpp:9:8: error: 'dr' was not declared in this scope st=dr=1; ^ componenteconexe.cpp:11:14: error: 'nr' was not declared in this scope v[start]=nr; ^ componenteconexe.cpp:15:24: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:27:10: error: 'n' was not declared in this scope fin>>n; ^ componenteconexe.cpp:28:16: error: 'x' was not declared in this scope while(fin>>x>>y) ^ componenteconexe.cpp:28:19: error: 'y' was not declared in this scope while(fin>>x>>y) ^ componenteconexe.cpp:36:9: error: 'nr' was not declared in this scope nr++; ^ componenteconexe.cpp:39:11: error: 'nr' was not declared in this scope fout<<nr<<'\n'; ^ componenteconexe.cpp:42:14: error: 'j' was not declared in this scope if(v[j]==i) ^
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ă.