#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 | #60860507 | Utilizator | |
| Fișier | tare_conexitate.cpp | Dimensiune | 1.11 KB |
| Data încărcării | 13 Noiembrie 2025, 11:23 | Scor/rezultat | Eroare de compilare |
tare_conexitate.cpp: In function 'void Citire()': tare_conexitate.cpp:14:40: error: no matching function for call to 'std::vector<std::vector<int> >::resize(int, std::vector<int>, int)' M.resize(n + 1,vector<int>(n + 1),0); ^ tare_conexitate.cpp:14:40: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from tare_conexitate.cpp:3: /usr/include/c++/4.8/bits/stl_vector.h:664:7: note: void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::size_type = unsigned int] resize(size_type __new_size) ^ /usr/include/c++/4.8/bits/stl_vector.h:664:7: note: candidate expects 1 argument, 3 provided /usr/include/c++/4.8/bits/stl_vector.h:684:7: note: void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::value_type = std::vector<int>] resize(size_type __new_size, const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:684:7: note: candidate expects 2 arguments, 3 provided tare_conexitate.cpp: In function 'void RWF()': tare_conexitate.cpp:32:29: warning: value computed is not used [-Wunused-value] M[i][j] == 1; ^
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ă.