#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 | #62497087 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 828 B |
| Data încărcării | 23 Ianuarie 2026, 09:21 | Scor/rezultat | Eroare de compilare |
componenteconexe.cpp:45:19: warning: multi-character character constant [-Wmultichar] fout<<'/n'; ^ componenteconexe.cpp:4:1: error: 'ifstream' does not name a type ifstream fin("componenteconexe.in"); ^ componenteconexe.cpp:5:1: error: 'ofstream' does not name a type ofstream fout("componenteconexe.out"); ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:24:5: error: 'fin' was not declared in this scope fin>>n; ^ componenteconexe.cpp:25:17: error: 'x' was not declared in this scope while (fin>>x>>y) ^ componenteconexe.cpp:25:20: error: 'y' was not declared in this scope while (fin>>x>>y) ^ componenteconexe.cpp:38:5: error: 'fout' was not declared in this scope fout<<nrc<<'\n'; ^ componenteconexe.cpp:39:10: error: 'i' was not declared in this scope for (i=1; i<=nrc; i++) ^ componenteconexe.cpp:41:14: error: 'j' was not declared in this scope for (j=1; j<=n; j++) ^
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ă.