#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 | #60456299 | Utilizator | |
| Fișier | tare_conexitate.cpp | Dimensiune | 1.05 KB |
| Data încărcării | 02 Noiembrie 2025, 12:19 | Scor/rezultat | Eroare de compilare |
tare_conexitate.cpp:6:1: error: 'vector' does not name a type vector<int> adj[N + 1]; ^ tare_conexitate.cpp:7:1: error: 'vector' does not name a type vector<int> adj_T[N + 1]; ^ tare_conexitate.cpp:8:1: error: 'stack' does not name a type stack<int> ST; ^ tare_conexitate.cpp: In function 'void dfs(int)': tare_conexitate.cpp:18:26: error: 'adj' was not declared in this scope for (const auto& v : adj[u]) ^ tare_conexitate.cpp:21:5: error: 'ST' was not declared in this scope ST.push(u); ^ tare_conexitate.cpp: In function 'void dfs_T(int)': tare_conexitate.cpp:26:26: error: 'adj_T' was not declared in this scope for (const auto& v : adj_T[u]) ^ tare_conexitate.cpp: In function 'int main()': tare_conexitate.cpp:37:9: error: 'adj' was not declared in this scope adj[u].push_back(v); ^ tare_conexitate.cpp:38:9: error: 'adj_T' was not declared in this scope adj_T[v].push_back(u); ^ tare_conexitate.cpp:46:12: error: 'ST' was not declared in this scope while (ST.size() > 0) { ^
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ă.