#583
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 | #63363776 | Utilizator | |
| Fișier | tare_conexitate.cpp | Dimensiune | 908 B |
| Data încărcării | 27 Februarie 2026, 22:11 | Scor/rezultat | Eroare de compilare |
tare_conexitate.cpp: In function 'void dfs1(int)': tare_conexitate.cpp:15:5: error: 'st' was not declared in this scope st.push(nod); ^ tare_conexitate.cpp: In function 'void dfs2(int, int)': tare_conexitate.cpp:20:27: error: too few arguments to function 'void dfs2(int, int)' if(!viz[v]) dfs2(v); ^ tare_conexitate.cpp:17:6: note: declared here void dfs2(int nod, int c){ ^ tare_conexitate.cpp: In function 'int main()': tare_conexitate.cpp:24:10: error: 'n' was not declared in this scope cin>>n>>m; ^ tare_conexitate.cpp:24:13: error: 'm' was not declared in this scope cin>>n>>m; ^ tare_conexitate.cpp:36:12: error: 'st' was not declared in this scope while(!st.empty()){ ^
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ă.