#3421
Se dă un graf orientat cu n vârfuri și m arce prin lista arcelor și un număr natural k. Afișați numărul de vârfuri ale componentei tare conexe în care se află vârful k.
| Problema | ctck | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64517730 | Utilizator | |
| Fișier | ctck.cpp | Dimensiune | 1.57 KB |
| Data încărcării | 12 Mai 2026, 10:31 | Scor/rezultat | 100 puncte |
ctck.cpp: In function ‘bool dfs(int, int, std::vector<std::vector<int> >&, std::vector<int>&)’: ctck.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++) | ~^~~~~~~~~~~~~ ctck.cpp: In function ‘std::vector<std::vector<int> > fid(int, std::vector<std::vector<int> >&)’: ctck.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++) | ~^~~~~~~~~ ctck.cpp: In function ‘int main()’: ctck.cpp:67:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<int> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 67 | for (i=0; i<r.size(); i++){ | ~^~~~~~~~~ ctck.cpp:69:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 69 | for (j=0; j<r[i].size(); j++) | ~^~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ctck 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ă.