#4068
Se dă lista muchiilor unui graf neorientat și un nod k. Să se determine nodurile din graf care au gradul egal cu gradul nodului k.
| Problema | GradeK | Operații I/O |
gradek.in/gradek.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #56951018 | Utilizator | |
| Fișier | gradek.cpp | Dimensiune | 698 B |
| Data încărcării | 11 Martie 2025, 15:39 | Scor/rezultat | Eroare de compilare |
gradek.cpp: In function 'int main()': gradek.cpp:25:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(graph[i].size() == gradek){ ^ gradek.cpp:27:43: error: no matching function for call to 'std::vector<int>::push_back(<unresolved overloaded function type>)' noduri.push_back(graph[i].size); ^ gradek.cpp:27:43: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from gradek.cpp:4: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int] push_back(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const value_type& {aka const int&}' /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int] push_back(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::value_type&& {aka int&&}'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GradeK 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ă.