#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 |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58343672 | Utilizator | |
Fișier | tare_conexitate.cpp | Dimensiune | 1.80 KB |
Data încărcării | 28 Mai 2025, 12:16 | Scor / rezultat | Eroare de compilare |
tare_conexitate.cpp: In function 'void dfs(int)': tare_conexitate.cpp:28:18: error: no match for 'operator[]' (operand types are 'int [102]' and 'std::vector<int>') if (vizit[nod] == 0) { ^ tare_conexitate.cpp:29:20: error: cannot convert 'std::vector<int>' to 'int' for argument '1' to 'void dfs(int)' dfs(nod); ^ tare_conexitate.cpp:30:33: error: no match for 'operator[]' (operand types are 'int [102]' and 'std::vector<int>') if (Low[start] > Low[nod]) ^ tare_conexitate.cpp:31:33: error: no match for 'operator[]' (operand types are 'int [102]' and 'std::vector<int>') Low[start] = Low[nod]; ^ tare_conexitate.cpp:34:24: error: no match for 'operator[]' (operand types are 'int [102]' and 'std::vector<int>') if (Instiva[nod]) ^ tare_conexitate.cpp:35:40: error: no match for 'operator[]' (operand types are 'int [102]' and 'std::vector<int>') if (Low[start] > prenum[nod]) ^ tare_conexitate.cpp:36:40: error: no match for 'operator[]' (operand types are 'int [102]' and 'std::vector<int>') Low[start] = prenum[nod]; ^ tare_conexitate.cpp:19:9: warning: unused variable 'i' [-Wunused-variable] int i,nod; ^ tare_conexitate.cpp: In function 'int main()': tare_conexitate.cpp:54:13: warning: unused variable 'j' [-Wunused-variable] int i, j, x, y; ^
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ă.