#583
Tare conexitate
Se dă un graf orientat cu n
noduri. Să se determine câte componente tare conexe are graful dat.
Problema | Tare conexitate | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #28387946 | Utilizator | |
Fișier | tare_conexitate.cpp | Dimensiune | 787 B |
Data încărcării | 04 Martie 2021, 08:47 | Scor / rezultat | Eroare de compilare |
tare_conexitate.cpp: In function 'void dfs1(int)': tare_conexitate.cpp:8:12: error: 'mat' was not declared in this scope if(mat[nod][i]==1&&v1[i]==0) ^ tare_conexitate.cpp: In function 'void dfs2(int)': tare_conexitate.cpp:14:12: error: 'mat' was not declared in this scope if(mat[i][nod]==1&&v2[i]==0) ^ tare_conexitate.cpp: In function 'int main()': tare_conexitate.cpp:19:5: error: expected initializer before 'cin' cin>>n>>m; ^ tare_conexitate.cpp:21:17: error: 'y' was not declared in this scope cin>>x>>y; ^ tare_conexitate.cpp:26:13: error: 's' was not declared in this scope s++; ^ tare_conexitate.cpp:27:13: error: 'j' was not declared in this scope for(j=1;j<=n;j++){ ^ tare_conexitate.cpp:33:13: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ tare_conexitate.cpp:37:11: error: 's' was not declared in this scope cout<<s; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Tare conexitate 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ă.