#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 | #64818055 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 866 B |
| Data încărcării | 03 Iunie 2026, 12:59 | Scor/rezultat | 0 puncte |
componenteconexe.cpp: In function ‘int dfs(int, int)’: componenteconexe.cpp:13:2: warning: no return statement in function returning non-void [-Wreturn-type] 13 | } | ^ componenteconexe.cpp: In function ‘int main()’: componenteconexe.cpp:20:16: warning: suggest parentheses around comparison in operand of ‘==’ [-Wparentheses] 20 | a[x][y]==a[y][x]==1; | ~~~~~~~^~~~~~~~~ componenteconexe.cpp:20:25: warning: statement has no effect [-Wunused-value] 20 | a[x][y]==a[y][x]==1; | ~~~~~~~~~~~~~~~~^~~ componenteconexe.cpp: In function ‘int dfs(int, int)’: componenteconexe.cpp:7:6: warning: infinite recursion detected [-Winfinite-recursion] 7 | int dfs(int k,int nrc) | ^~~ componenteconexe.cpp:12:13: note: recursive call 12 | dfs(i,nrc); | ~~~^~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 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ă.