#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 | #63333598 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 829 B |
| Data încărcării | 26 Februarie 2026, 15:48 | Scor/rezultat | 0 puncte |
componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:18:55: warning: suggest parentheses around '&&' within '||' [-Wparentheses] for(j=1;j<=n;j++) d[i][j]=d[i][j]||d[i][k]&&d[k][j]; ^ componenteconexe.cpp:7:11: warning: unused variable 'm' [-Wunused-variable] int n,m,i,j,k,d[101][101]={0},ok=1,c=0,v[101]={0},y[101]={0}; ^ componenteconexe.cpp:7:35: warning: unused variable 'ok' [-Wunused-variable] int n,m,i,j,k,d[101][101]={0},ok=1,c=0,v[101]={0},y[101]={0}; ^ componenteconexe.cpp:7:40: warning: unused variable 'c' [-Wunused-variable] int n,m,i,j,k,d[101][101]={0},ok=1,c=0,v[101]={0},y[101]={0}; ^ componenteconexe.cpp:7:44: warning: variable 'v' set but not used [-Wunused-but-set-variable] int n,m,i,j,k,d[101][101]={0},ok=1,c=0,v[101]={0},y[101]={0}; ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0 secunde | Raspuns gresit. | 60 | 0 | ||
| 4 | 0 secunde | Raspuns gresit. | 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ă.