#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 | #64516938 | Utilizator | |
| Fișier | tare_conexitate.cpp | Dimensiune | 1.31 KB |
| Data încărcării | 12 Mai 2026, 10:11 | Scor/rezultat | 100 puncte |
tare_conexitate.cpp: In function ‘bool dfs(int, int, std::vector<std::vector<int> >&, std::vector<int>&)’: tare_conexitate.cpp:12:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 12 | for (i=0; i<v1[a].size(); i++) | ~^~~~~~~~~~~~~ tare_conexitate.cpp: In function ‘std::vector<std::vector<int> > fid(int, std::vector<std::vector<int> >&)’: tare_conexitate.cpp:31:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<int> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 31 | for (i=0; i<a.size(); i++) | ~^~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.003 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
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ă.