#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 | #64818082 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 776 B |
| Data încărcării | 03 Iunie 2026, 13:00 | Scor/rezultat | Eroare de compilare |
componenteconexe.cpp:4:1: error: ‘ifstream’ does not name a type 4 | ifstream fin("componenteconexe.in"); | ^~~~~~~~ componenteconexe.cpp:5:1: error: ‘ofstream’ does not name a type 5 | ofstream fout("componeteconexe.out"); | ^~~~~~~~ componenteconexe.cpp: In function ‘int main()’: componenteconexe.cpp:20:5: error: ‘fin’ was not declared in this scope 20 | fin>>n; | ^~~ componenteconexe.cpp:31:9: error: ‘fout’ was not declared in this scope 31 | fout<<nrc<<endl; | ^~~~ componenteconexe.cpp:37:17: error: ‘fout’ was not declared in this scope 37 | fout<<j<<" "; | ^~~~ componenteconexe.cpp:36:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 36 | if(viz[j]==i) | ^~ componenteconexe.cpp:38:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 38 | fout<<endl; | ^~~~ componenteconexe.cpp:38:17: error: ‘fout’ was not declared in this scope
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ă.