#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 | #64266411 | Utilizator | |
| Fișier | tare_conexitate.cpp | Dimensiune | 427 B |
| Data încărcării | 27 Aprilie 2026, 10:41 | Scor/rezultat | Eroare de compilare |
tare_conexitate.cpp: In function ‘void read()’: tare_conexitate.cpp:22:22: error: ‘__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type’ {aka ‘class std::vector<int>’} has no member named ‘push’ 22 | a[x].push(y); | ^~~~ tare_conexitate.cpp:23:15: error: ‘__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type’ {aka ‘class std::vector<int>’} has no member named ‘push’ 23 | at[y].push(x); | ^~~~ tare_conexitate.cpp: In function ‘void dfs(int)’: tare_conexitate.cpp:29:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 29 | int main(){ | ^~ tare_conexitate.cpp:29:9: note: remove parentheses to default-initialize a variable 29 | int main(){ | ^~ | -- tare_conexitate.cpp:29:9: note: or replace parentheses with braces to value-initialize a variable tare_conexitate.cpp:29:11: error: a function-definition is not allowed here before ‘{’ token 29 | int main(){ | ^ tare_conexitate.cpp:30:12: error: expected ‘}’ at end of input 30 | read(); | ^ tare_conexitate.cpp:27:16: note: to match this ‘{’ 27 | void dfs(int x){ | ^
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ă.