#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 | #63505115 | Utilizator | |
| Fișier | componenteconexe6.cpp | Dimensiune | 869 B |
| Data încărcării | 06 Martie 2026, 09:13 | Scor/rezultat | Eroare de compilare |
componenteconexe6.cpp:5:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("componenteconexe6.in"); ^ componenteconexe6.cpp:6:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("componenteconexe6.out"); ^ componenteconexe6.cpp: In function 'void bfs(int)': componenteconexe6.cpp:16:11: error: could not convert 'q' from 'std::queue<int>' to 'bool' while(q!.empty()) ^ componenteconexe6.cpp:16:12: error: expected ')' before '!' token while(q!.empty()) ^ componenteconexe6.cpp:16:13: error: expected primary-expression before '.' token while(q!.empty()) ^ componenteconexe6.cpp:16:21: error: expected ';' before ')' token while(q!.empty()) ^ componenteconexe6.cpp:51:1: error: expected '}' at end of input } ^
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ă.