Borderou de evaluare (job #2464371)

Utilizator georgerapeanuRapeanu George georgerapeanu Data 28 septembrie 2019 14:39:51
Problema Sirul infinit Status done
Runda Romanian Collegiate Programming Contest 2019 Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In member function 'void SuffixTree::go_edge()': main.cpp:77:100: error: no matching function for call to 'std::map<int, edge_t>::count(__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type&)' active_edge = (active_len && sons[active_point].count(v[(int)v.size() - 1 - active_len]) ? sons[active_point][v[(int)v.size() - 1 - active_len]]:edge_t()); ^ In file included from /usr/include/c++/6/map:61:0, from main.cpp:6: /usr/include/c++/6/bits/stl_map.h:1125:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::count(const key_type&) const [with _Key = int; _Tp = edge_t; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, edge_t> >; std::map<_Key, _Tp, _Compare, _Alloc>::size_type = long unsigned int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] count(const key_type& __x) const ^~~~~ /usr/include/c++/6/bits/stl_map.h:1125:7: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' to 'const key_type& {aka const int&}' /usr/include/c++/6/bits/stl_map.h:1131:2: note: candidate: template<class _Kt> decltype (((const std::map<_Key, _Tp, _Compare, _Alloc>*)this)->std::map<_Key, _Tp, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::map<_Key, _Tp, _Compare, _Alloc>::count(const _Kt&) const [with _Kt = _Kt; _Key = int; _Tp = edge_t; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, edge_t> >] count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x)) ^~~~~ /usr/include/c++/6/bits/stl_map.h:1131:2: note: template argument deduction/substitution failed: /usr/include/c++/6/bits/stl_map.h: In substitution of 'template<class _Kt> decltype (((const std::map<_Key, _Tp, _Compare, _Alloc>*)this)->std::map<_Key, _Tp, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::map<_Key, _Tp, _Compare, _Alloc>::count(const _Kt&) const [with _Kt = std::pair<int, int>]': main.cpp:77:100: required from here /usr/include/c++/6/bits/stl_map.h:1131:2: error: no matching function for call to 'std::_Rb_tree<int, std::pair<const int, edge_t>, std::_Select1st<std::pair<const int, edge_t> >, std::less<int>, std::allocator<std::pair<const int, edge_t> > >::_M_count_tr(const std::pair<int, int>&) const' In file included from /usr/include/c++/6/map:60:0, from main.cpp:6: /usr/include/c++/6/bits/stl_tree.h:1150:2: note: candidate: template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_count_tr(const _Kt&) const [with _Kt = _Kt; _Req = _Req; _Key = int; _Val = std::pair<const int, edge_t>; _KeyOfValue = std::_Select1st<std::pair<const int, edge_t> >; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, edge_t> >] _M_count_tr(const _Kt& __k) const ^~~~~~~~~~~ /usr/include/c++/6/bits/stl_tree.h:1150:2: note: template argument deduction/substitution failed: /usr/include/c++/6/bits/stl_tree.h:1147:9: error: no type named 'type' in 'struct std::__has_is_transparent<std::less<int>, std::pair<int, int>, void>' typename _Req = ^~~~~~~~ main.cpp:77:122: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::map<int, edge_t> > >::value_type {aka std::map<int, edge_t>}' and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}') active_edge = (active_len && sons[active_point].count(v[(int)v.size() - 1 - active_len]) ? sons[active_point][v[(int)v.size() - 1 - active_len]]:edge_t()); ^ In file included from /usr/include/c++/6/map:61:0, from main.cpp:6: /usr/include/c++/6/bits/stl_map.h:474:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = edge_t; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, edge_t> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = edge_t; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] operator[](const key_type& __k) ^~~~~~~~ /usr/include/c++/6/bits/stl_map.h:474:7: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' to 'const key_type& {aka const int&}' /usr/include/c++/6/bits/stl_map.h:494:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = int; _Tp = edge_t; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, edge_t> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = edge_t; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] operator[](key_type&& __k) ^~~~~~~~ /usr/include/c++/6/bits/stl_map.h:494:7: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' to 'std::map<int, edge_t>::key_type&& {aka int&&}' main.cpp: In member function 'int SuffixTree::split_active_edge()': main.cpp:106:27: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::map<int, edge_t> > >::value_type {aka std::map<int, edge_t>}' and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}') sons[active_point][v[active_to_nod.fst_idx]] = active_to_nod; ^ In file included from /usr/include/c++/6/map:61:0, from main.cpp:6: /usr/include/c++/6/bits/stl_map.h:474:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = edge_t; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, edge_t> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = edge_t; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] operator[](const key_type& __k) ^~~~~~~~ /usr/include/c++/6/bits/stl_map.h:474:7: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' to 'const key_type& {aka const int&}' /usr/include/c++/6/bits/stl_map.h:494:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = int; _Tp = edge_t; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, edge_t> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = edge_t; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] Non zero exit status: 1

Ceva nu functioneaza?