#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 | #62496460 | Utilizator | |
| Fișier | tare_conexitate.cpp | Dimensiune | 1.88 KB |
| Data încărcării | 23 Ianuarie 2026, 09:09 | Scor/rezultat | 100 puncte |
tare_conexitate.cpp: In function 'void insertEdge(std::vector<std::vector<int> >&, int, int)': tare_conexitate.cpp:9:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (v1 < 0 || v1 >= graph.size()) return; ^ tare_conexitate.cpp:10:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (v2 < 0 || v2 >= graph.size()) return; ^ tare_conexitate.cpp: In function 'void kojaru(std::vector<std::vector<int> >&, int, std::stack<int>&)': tare_conexitate.cpp:40:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int node = 1; node < graph.size(); node++) { ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0 secunde | OK. | 40 | 40 | ||
| 3 | 0 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ă.