#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 | #64921339 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 1.05 KB |
| Data încărcării | 13 Iunie 2026, 21:08 | Scor/rezultat | 0 puncte |
componenteconexe.cpp: In function ‘int dfs(int)’: componenteconexe.cpp:21:1: warning: no return statement in function returning non-void [-Wreturn-type] 21 | } | ^ componenteconexe.cpp: In function ‘int main()’: componenteconexe.cpp:25:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 25 | freopen("componenteconexe.in", "r", stdin); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ componenteconexe.cpp:26:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 26 | freopen("componenteconexe.out", "w", stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ componenteconexe.cpp: In function ‘int dfs(int)’: componenteconexe.cpp:12:5: warning: infinite recursion detected [-Winfinite-recursion] 12 | int dfs(int nod) | ^~~ componenteconexe.cpp:19:16: note: recursive call 19 | dfs(x); | ~~~^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Caught fatal signal 11 | 60 | 0 | ||
| 4 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| Punctaj total | 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ă.