#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 | #64104652 | Utilizator | |
| Fișier | tare_conexitate.cpp | Dimensiune | 887 B |
| Data încărcării | 17 Aprilie 2026, 09:44 | Scor/rezultat | Eroare de compilare |
tare_conexitate.cpp: In function ‘void dfs1(int)’: tare_conexitate.cpp:17:4: error: ‘succ’ was not declared in this scope 17 | succ[x]=nc; | ^~~~ tare_conexitate.cpp:17:12: error: ‘nc’ was not declared in this scope; did you mean ‘n’? 17 | succ[x]=nc; | ^~ | n tare_conexitate.cpp: In function ‘void dfs2(int)’: tare_conexitate.cpp:25:4: error: ‘pred’ was not declared in this scope 25 | pred[x]=nc; | ^~~~ tare_conexitate.cpp:25:12: error: ‘nc’ was not declared in this scope; did you mean ‘n’? 25 | pred[x]=nc; | ^~ | n tare_conexitate.cpp: In function ‘void desc_comp_tconexe()’: tare_conexitate.cpp:35:12: error: ‘succ’ was not declared in this scope 35 | if(succ[i]==0) | ^~~~ tare_conexitate.cpp:37:13: error: ‘nc’ was not declared in this scope; did you mean ‘n’? 37 | nc++; | ^~ | n tare_conexitate.cpp:41:29: error: ‘pred’ was not declared in this scope 41 | if(succ[j]!=pred[j]) | ^~~~ tare_conexitate.cpp:45:11: error: ‘nc’ was not declared in this scope; did you mean ‘n’? 45 | cout<<nc; | ^~ | n tare_conexitate.cpp: In function ‘int main()’: tare_conexitate.cpp:51:5: error: ‘RW’ was not declared in this scope 51 | RW(); | ^~
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ă.