#3713
company_tree
Undeva, într-un ținut îndepărtat, își desfășoară activitatea o vestită companie, mai exact Mondial Computers SRL. Aceștia lucrează cu mulți clienți de renume, deci au nevoie de multă forță de muncă. Astfel, ei au o bază de date în care mențin informații despre angajații lor, dar, recent, echipa care se ocupa de această bază de date a dat dovadă de un randament scăzut, iar ca urmare a acestui fapt, manager-ul general a decis, fără a ține cont de consecințe, să îi concedieze, iar aceștia, de supărare, au șters înainte de a pleca din companie toate datele angajaților. Acum manager-ul are nevoie de ajutorul vostru(voluntar, desigur) pentru reorganizarea acestei baze de date până reușește să angajeze noi oameni.
Problema | company_tree | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 2 secunde | Limita memorie |
Total: 128 MB
/
Stivă 32 MB
|
Id soluție | #43906723 | Utilizator | |
Fișier | company_tree.cpp | Dimensiune | 6.76 KB |
Data încărcării | 25 Mai 2023, 19:50 | Scor / rezultat | Eroare de compilare |
company_tree.cpp: In member function 'void Graph::dfs(int, int, const std::vector<std::vector<int> >&)': company_tree.cpp:112:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int eventIdx = 0; eventIdx < events[node].size(); eventIdx++) { ^ company_tree.cpp:113:62: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type 'const value_type {aka const int}' const std::vector<int>& event = events[node][eventIdx]; ^ company_tree.cpp: In function 'int main()': company_tree.cpp:94:22: error: 'std::vector<int> Graph::employeeLocations' is private std::vector<int> employeeLocations; ^ company_tree.cpp:185:15: error: within this context graph.employeeLocations[i] = 1; ^ company_tree.cpp:95:17: error: 'SegmentTree Graph::segmentTree' is private SegmentTree segmentTree; ^ company_tree.cpp:186:15: error: within this context graph.segmentTree.update(1, force); ^ company_tree.cpp:201:56: error: no matching function for call to 'std::vector<int>::push_back(<brace-enclosed initializer list>)' events[1].push_back({eventType, employeeId}); ^ company_tree.cpp:201:56: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from company_tree.cpp:2: /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 '<brace-enclosed initializer list>' 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 '<brace-enclosed initializer list>' to 'std::vector<int>::value_type&& {aka int&&}' company_tree.cpp:205:78: error: no matching function for call to 'std::vector<int>::push_back(<brace-enclosed initializer list>)' events[source].push_back({eventType, source, threshold, newValue}); ^ company_tree.cpp:205:78: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from company_tree.cpp:2: /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 '<brace-enclosed initializer list>' 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 '<brace-enclosed initializer list>' to 'std::vector<int>::value_type&& {aka int&&}' company_tree.cpp:209:71: error: no matching function for call to 'std::vector<int>::push_back(<brace-enclosed initializer list>)' events[source].push_back({eventType, source, numEmployees}); ^ company_tree.cpp:209:71: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from company_tree.cpp:2: /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 '<brace-enclosed initializer list>' 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 '<brace-enclosed initializer list>' to 'std::vector<int>::value_type&& {aka int&&}'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema company_tree 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ă.