#3713
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 | #63979081 | Utilizator | |
| Fișier | company_tree.cpp | Dimensiune | 4.93 KB |
| Data încărcării | 01 Aprilie 2026, 12:28 | Scor/rezultat | Eroare de compilare |
In file included from /usr/include/c++/4.8/ext/pb_ds/detail/type_utils.hpp:47:0, from /usr/include/c++/4.8/ext/pb_ds/tag_and_trait.hpp:46, from /usr/include/c++/4.8/ext/pb_ds/assoc_container.hpp:46, from company_tree.cpp:7: /usr/include/c++/4.8/tr1/type_traits:121:3: error: redefinition of 'struct std::tr1::__is_integral_helper<long long int>' _DEFINE_SPEC(0, __is_integral_helper, long long, true) ^ /usr/include/c++/4.8/tr1/type_traits:117:3: error: previous definition of 'struct std::tr1::__is_integral_helper<long long int>' _DEFINE_SPEC(0, __is_integral_helper, int, true) ^ /usr/include/c++/4.8/tr1/type_traits:122:3: error: redefinition of 'struct std::tr1::__is_integral_helper<long long unsigned int>' _DEFINE_SPEC(0, __is_integral_helper, unsigned long long, true) ^ /usr/include/c++/4.8/tr1/type_traits:118:3: error: previous definition of 'struct std::tr1::__is_integral_helper<long long unsigned int>' _DEFINE_SPEC(0, __is_integral_helper, unsigned int, true) ^ /usr/include/c++/4.8/tr1/type_traits:549:3: error: redefinition of 'struct std::tr1::__is_signed_helper<long long int>' _DEFINE_SPEC(0, __is_signed_helper, long long, true) ^ /usr/include/c++/4.8/tr1/type_traits:547:3: error: previous definition of 'struct std::tr1::__is_signed_helper<long long int>' _DEFINE_SPEC(0, __is_signed_helper, int, true) ^ /usr/include/c++/4.8/tr1/type_traits:564:3: error: redefinition of 'struct std::tr1::__is_unsigned_helper<long long unsigned int>' _DEFINE_SPEC(0, __is_unsigned_helper, unsigned long long, true) ^ /usr/include/c++/4.8/tr1/type_traits:562:3: error: previous definition of 'struct std::tr1::__is_unsigned_helper<long long unsigned int>' _DEFINE_SPEC(0, __is_unsigned_helper, unsigned int, true) ^ In file included from /usr/include/c++/4.8/tr1/functional:42:0, from /usr/include/c++/4.8/ext/pb_ds/detail/standard_policies.hpp:51, from /usr/include/c++/4.8/ext/pb_ds/assoc_container.hpp:47, from company_tree.cpp:7: /usr/include/c++/4.8/tr1/functional_hash.h:75:3: error: redefinition of 'std::size_t std::tr1::hash<_Tp>::operator()(_Tp) const [with _Tp = long long int; std::size_t = unsigned int]' _TR1_hashtable_define_trivial_hash(long long); ^ /usr/include/c++/4.8/tr1/functional_hash.h:73:3: error: 'std::size_t std::tr1::hash<_Tp>::operator()(_Tp) const [with _Tp = long long int; std::size_t = unsigned int]' previously declared here _TR1_hashtable_define_trivial_hash(int); ^ /usr/include/c++/4.8/tr1/functional_hash.h:79:3: error: redefinition of 'std::size_t std::tr1::hash<_Tp>::operator()(_Tp) const [with _Tp = long long unsigned int; std::size_t = unsigned int]' _TR1_hashtable_define_trivial_hash(unsigned long long); ^ /usr/include/c++/4.8/tr1/functional_hash.h:77:3: error: 'std::size_t std::tr1::hash<_Tp>::operator()(_Tp) const [with _Tp = long long unsigned int; std::size_t = unsigned int]' previously declared here _TR1_hashtable_define_trivial_hash(unsigned int); ^ In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from company_tree.cpp:1: /usr/include/c++/4.8/functional:989:16: error: template parameter 'int _Num' template<int _Num> struct _Placeholder { }; ^ In file included from /usr/include/c++/4.8/ext/pb_ds/detail/standard_policies.hpp:51:0, from /usr/include/c++/4.8/ext/pb_ds/assoc_container.hpp:47, from company_tree.cpp:7: /usr/include/c++/4.8/tr1/functional:53:24: error: redeclared here as 'long long int <anonymous>' template<int> struct _Placeholder; ^ In file included from /usr/include/c++/4.8/ext/pb_ds/detail/bin_search_tree_/traits.hpp:44:0, from /usr/include/c++/4.8/ext/pb_ds/detail/branch_policy/traits.hpp:45, from /usr/include/c++/4.8/ext/pb_ds/assoc_container.hpp:49, from company_tree.cpp:7: /usr/include/c++/4.8/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp: In instantiation of 'class __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >': /usr/include/c++/4.8/bits/stl_iterator_base_types.h:142:1: required by substitution of 'template<class _Up> static std::__sfinae_types::__one std::__has_iterator_category_helper<_Tp>::__test(std::__has_iterator_category_helper<_Tp>::_Wrap_type<typename _Up::iterator_category>*) [with _Up = _Up; _Tp = __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >] [with _Up = __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >]' /usr/include/c++/4.8/bits/stl_iterator_base_types.h:142:1: required from 'constexpr const bool std::__has_iterator_category_helper<__gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> > >::value' /usr/include/c++/4.8/bits/stl_iterator_base_types.h:142:1: required from 'struct std::__has_iterator_category<__gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> > >' /usr/include/c++/4.8/bits/stl_iterator_base_types.h:159:12: required from 'struct std::iterator_traits<__gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> > >' /usr/include/c++/4.8/ext/pb_ds/detail/branch_policy/branch_policy.hpp:92:68: required from 'struct __gnu_pbds::detail::branch_policy<__gnu_pbds::detail::bin_search_tree_const_node_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_node_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, std::allocator<char> >, std::allocator<char> >' /usr/include/c++/4.8/ext/pb_ds/tree_policy.hpp:64:9: required from 'class __gnu_pbds::tree_order_statistics_node_update<__gnu_pbds::detail::bin_search_tree_const_node_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_node_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, std::allocator<char> >, std::less<long long int>, std::allocator<char> >' /usr/include/c++/4.8/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp:99:11: required from 'class __gnu_pbds::detail::bin_search_tree_set<long long int, __gnu_pbds::null_type, std::less<long long int>, __gnu_pbds::detail::tree_traits<long long int, __gnu_pbds::null_type, std::less<long long int>, __gnu_pbds::tree_order_statistics_node_update, __gnu_pbds::rb_tree_tag, std::allocator<char> >, std::allocator<char> >' /usr/include/c++/4.8/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp:84:11: required from 'class __gnu_pbds::detail::rb_tree_set<long long int, __gnu_pbds::null_type, std::less<long long int>, __gnu_pbds::detail::tree_traits<long long int, __gnu_pbds::null_type, std::less<long long int>, __gnu_pbds::tree_order_statistics_node_update, __gnu_pbds::rb_tree_tag, std::allocator<char> >, std::allocator<char> >' /usr/include/c++/4.8/ext/pb_ds/assoc_container.hpp:555:9: required from 'class __gnu_pbds::basic_branch<long long int, __gnu_pbds::null_type, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update<__gnu_pbds::detail::bin_search_tree_const_node_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_node_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, true, std::allocator<char> >, std::allocator<char> >, std::less<long long int>, std::allocator<char> >, __gnu_cxx::typelist::node<__gnu_cxx::typelist::chain<std::less<long long int>, __gnu_cxx::typelist::chain<__gnu_pbds::detail::tree_traits<long long int, __gnu_pbds::null_type, std::less<long long int>, __gnu_pbds::tree_order_statistics_node_update, __gnu_pbds::rb_tree_tag, std::allocator<char> >, __gnu_cxx::typelist::null_type> > >, std::allocator<char> >' /usr/include/c++/4.8/ext/pb_ds/assoc_container.hpp:635:9: required from 'class __gnu_pbds::tree<long long int, __gnu_pbds::null_type, std::less<long long int>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update, std::allocator<char> >' company_tree.cpp:142:23: required from here /usr/include/c++/4.8/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp:181:7: error: postfix '__gnu_pbds::detail::bin_search_tree_const_it_<Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc> __gnu_pbds::detail::bin_search_tree_const_it_<Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc>::operator++(long long int) [with Node_Pointer = __gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*; Value_Type = long long int; Pointer = long long int*; Const_Pointer = const long long int*; Reference = long long int&; Const_Reference = const long long int&; bool Is_Forward_Iterator = true; _Alloc = std::allocator<char>]' must take 'int' as its argument operator++(int) ^ /usr/include/c++/4.8/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp:196:7: error: postfix '__gnu_pbds::detail::bin_search_tree_const_it_<Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc> __gnu_pbds::detail::bin_search_tree_const_it_<Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc>::operator--(long long int) [with Node_Pointer = __gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*; Value_Type = long long int; Pointer = long long int*; Const_Pointer = const long long int*; Reference = long long int&; Const_Reference = const long long int&; bool Is_Forward_Iterator = true; _Alloc = std::allocator<char>]' must take 'int' as its argument operator--(int) ^ /usr/include/c++/4.8/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp: In instantiation of 'class __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*, long long int, long long int*, const long long int*, long long int&, const long long int&, false, std::allocator<char> >': company_tree.cpp:151:27: required from here /usr/include/c++/4.8/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp:181:7: error: postfix '__gnu_pbds::detail::bin_search_tree_const_it_<Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc> __gnu_pbds::detail::bin_search_tree_const_it_<Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc>::operator++(long long int) [with Node_Pointer = __gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*; Value_Type = long long int; Pointer = long long int*; Const_Pointer = const long long int*; Reference = long long int&; Const_Reference = const long long int&; bool Is_Forward_Iterator = false; _Alloc = std::allocator<char>]' must take 'int' as its argument operator++(int) ^ /usr/include/c++/4.8/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp:196:7: error: postfix '__gnu_pbds::detail::bin_search_tree_const_it_<Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc> __gnu_pbds::detail::bin_search_tree_const_it_<Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc>::operator--(long long int) [with Node_Pointer = __gnu_pbds::detail::rb_tree_node_<long long int, unsigned int, std::allocator<char> >*; Value_Type = long long int; Pointer = long long int*; Const_Pointer = const long long int*; Reference = long long int&; Const_Reference = const long long int&; bool Is_Forward_Iterator = false; _Alloc = std::allocator<char>]' must take 'int' as its argument operator--(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ă.