#3702
npath
Fie N
și K
două numere naturale. Toate punctele din plan de coordonate întregi (x,y)
cu proprietatea 0 ≤ x ≤ N
, 0 ≤ y ≤ N
se unesc prin linii orizontale și verticale de lungime 1
. Apoi K
linii de lungime 1
dintre cele de mai sus se șterg. Definim o cale ca fiind o succesiune continuă de linii orizontale sau verticale de lungime 1
, între originea sistemului de axe și punctul de coordonate (N, N)
, cu lungimea totală 2∙N
. Să se determine numărul total de căi distincte.
Concursul Național Info Pro, Etapa IV
Problema | npath | Operații I/O |
npath.in /npath.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 256 MB
/
Stivă 8 MB
|
Id soluție | #52812188 | Utilizator | |
Fișier | npath.cpp | Dimensiune | 908 B |
Data încărcării | 09 Octombrie 2024, 22:00 | Scor / rezultat | Eroare de compilare |
In file included from /usr/include/c++/4.8/bits/hashtable.h:35:0, from /usr/include/c++/4.8/unordered_map:47, from npath.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h: In instantiation of 'struct std::__detail::_Hash_code_base<elem, std::pair<const elem, int>, std::__detail::_Select1st, std::hash<elem>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>': /usr/include/c++/4.8/bits/hashtable_policy.h:1402:10: required from 'struct std::__detail::_Hashtable_base<elem, std::pair<const elem, int>, std::__detail::_Select1st, std::equal_to<elem>, std::hash<elem>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, false, true> >' /usr/include/c++/4.8/bits/hashtable.h:174:11: required from 'class std::_Hashtable<elem, std::pair<const elem, int>, std::allocator<std::pair<const elem, int> >, std::__detail::_Select1st, std::equal_to<elem>, std::hash<elem>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >' /usr/include/c++/4.8/bits/unordered_map.h:100:18: required from 'class std::unordered_map<elem, int>' npath.cpp:11:27: required from here /usr/include/c++/4.8/bits/hashtable_policy.h:1070:12: error: invalid use of incomplete type 'struct std::hash<elem>' struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, ^ In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<elem>' struct hash; ^ In file included from /usr/include/c++/4.8/bits/hashtable.h:35:0, from /usr/include/c++/4.8/unordered_map:47, from npath.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h:1070:12: error: invalid use of incomplete type 'struct std::hash<elem>' struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, ^ In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<elem>' struct hash; ^ In file included from /usr/include/c++/4.8/bits/hashtable.h:35:0, from /usr/include/c++/4.8/unordered_map:47, from npath.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h:1082:53: error: invalid use of incomplete type 'struct std::hash<elem>' using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; ^ In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<elem>' struct hash; ^ In file included from /usr/include/c++/4.8/bits/hashtable.h:35:0, from /usr/include/c++/4.8/unordered_map:47, from npath.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h:1082:53: error: invalid use of incomplete type 'struct std::hash<elem>' using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; ^ In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<elem>' struct hash; ^ npath.cpp: In constructor 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = elem; _Tp = int; _Hash = std::hash<elem>; _Pred = std::equal_to<elem>; _Alloc = std::allocator<std::pair<const elem, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<elem>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<elem>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const elem, int> >]': npath.cpp:11:27: error: invalid use of incomplete type 'std::unordered_map<elem, int>::hasher {aka struct std::hash<elem>}' unordered_map <elem, int> m; ^ In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'std::unordered_map<elem, int>::hasher {aka struct std::hash<elem>}' struct hash; ^ npath.cpp:11:27: note: when instantiating default argument for call to std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = elem; _Tp = int; _Hash = std::hash<elem>; _Pred = std::equal_to<elem>; _Alloc = std::allocator<std::pair<const elem, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<elem>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<elem>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const elem, int> >] unordered_map <elem, int> m; ^ In file included from /usr/include/c++/4.8/bits/hashtable.h:35:0, from /usr/include/c++/4.8/unordered_map:47, from npath.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h: In instantiation of 'std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::__hash_code std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::_M_hash_code(const _Key&) const [with _Key = elem; _Value = std::pair<const elem, int>; _ExtractKey = std::__detail::_Select1st; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing; std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::__hash_code = unsigned int]': /usr/include/c++/4.8/bits/hashtable_policy.h:513:49: required from 'std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::mapped_type& std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::operator[](std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::key_type&&) [with _Key = elem; _Pair = std::pair<const elem, int>; _Alloc = std::allocator<std::pair<const elem, int> >; _Equal = std::equal_to<elem>; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::mapped_type = int; std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::key_type = elem]' /usr/include/c++/4.8/bits/unordered_map.h:600:20: required from 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type&&) [with _Key = elem; _Tp = int; _Hash = std::hash<elem>; _Pred = std::equal_to<elem>; _Alloc = std::allocator<std::pair<const elem, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = elem]' npath.cpp:24:25: required from here /usr/include/c++/4.8/bits/hashtable_policy.h:1103:22: error: no match for call to '(const std::hash<elem>) (const elem&)' { return _M_h1()(__k); } ^ /usr/include/c++/4.8/bits/hashtable_policy.h: In instantiation of 'std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::_Hash_code_base(const _ExtractKey&, const _H1&, const _H2&, const std::__detail::_Default_ranged_hash&) [with _Key = elem; _Value = std::pair<const elem, int>; _ExtractKey = std::__detail::_Select1st; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing]': /usr/include/c++/4.8/bits/hashtable_policy.h:1463:65: required from 'std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::_Hashtable_base(const _ExtractKey&, const _H1&, const _H2&, const _Hash&, const _Equal&) [with _Key = elem; _Value = std::pair<const elem, int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<elem>; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, false, true>]' /usr/include/c++/4.8/bits/hashtable.h:828:24: required from 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable(std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const allocator_type&) [with _Key = elem; _Value = std::pair<const elem, int>; _Alloc = std::allocator<std::pair<const elem, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<elem>; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type = unsigned int; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::allocator_type = std::allocator<std::pair<const elem, int> >]' /usr/include/c++/4.8/bits/hashtable.h:397:26: required from 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable(std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type, const _H1&, const key_equal&, const allocator_type&) [with _Key = elem; _Value = std::pair<const elem, int>; _Alloc = std::allocator<std::pair<const elem, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<elem>; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type = unsigned int; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::key_equal = std::equal_to<elem>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::allocator_type = std::allocator<std::pair<const elem, int> >]' /usr/include/c++/4.8/bits/unordered_map.h:142:35: required from 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = elem; _Tp = int; _Hash = std::hash<elem>; _Pred = std::equal_to<elem>; _Alloc = std::allocator<std::pair<const elem, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<elem>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<elem>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const elem, int> >]' npath.cpp:11:27: required from here /usr/include/c++/4.8/bits/hashtable_policy.h:1099:63: error: invalid use of incomplete type 'struct std::hash<elem>' : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } ^ In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<elem>' struct hash; ^ In file included from /usr/include/c++/4.8/bits/hashtable.h:35:0, from /usr/include/c++/4.8/unordered_map:47, from npath.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h:1099:63: error: invalid use of incomplete type 'struct std::hash<elem>' : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } ^ In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<elem>' struct hash; ^ In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h: In instantiation of 'bool std::equal_to<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = elem]': /usr/include/c++/4.8/bits/hashtable_policy.h:1166:72: required from 'static bool std::__detail::_Equal_helper<_Key, _Value, _ExtractKey, _Equal, _HashCodeType, true>::_S_equals(const _Equal&, const _ExtractKey&, const _Key&, _HashCodeType, std::__detail::_Hash_node<_Value, true>*) [with _Key = elem; _Value = std::pair<const elem, int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<elem>; _HashCodeType = unsigned int]' /usr/include/c++/4.8/bits/hashtable_policy.h:1470:23: required from 'bool std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::_M_equals(const _Key&, std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::__hash_code, std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::__node_type*) const [with _Key = elem; _Value = std::pair<const elem, int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<elem>; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::__hash_code = unsigned int; std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::__node_type = std::__detail::_Hash_node<std::pair<const elem, int>, true>]' /usr/include/c++/4.8/bits/hashtable.h:1165:4: required from 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__node_base* std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_M_find_before_node(std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type, const key_type&, std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__hash_code) const [with _Key = elem; _Value = std::pair<const elem, int>; _Alloc = std::allocator<std::pair<const elem, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<elem>; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__node_base = std::__detail::_Hash_node_base; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type = unsigned int; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::key_type = elem; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__hash_code = unsigned int]' /usr/include/c++/4.8/bits/hashtable.h:604:65: required from 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__node_type* std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_M_find_node(std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type, const key_type&, std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__hash_code) const [with _Key = elem; _Value = std::pair<const elem, int>; _Alloc = std::allocator<std::pair<const elem, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<elem>; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__node_type = std::__detail::_Hash_node<std::pair<const elem, int>, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type = unsigned int; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::key_type = elem; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__hash_code = unsigned int]' /usr/include/c++/4.8/bits/hashtable_policy.h:515:60: required from 'std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::mapped_type& std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::operator[](std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::key_type&&) [with _Key = elem; _Pair = std::pair<const elem, int>; _Alloc = std::allocator<std::pair<const elem, int> >; _Equal = std::equal_to<elem>; _H1 = std::hash<elem>; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::mapped_type = int; std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::key_type = elem]' /usr/include/c++/4.8/bits/unordered_map.h:600:20: required from 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type&&) [with _Key = elem; _Tp = int; _Hash = std::hash<elem>; _Pred = std::equal_to<elem>; _Alloc = std::allocator<std::pair<const elem, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = elem]' npath.cpp:24:25: required from here /usr/include/c++/4.8/bits/stl_function.h:208:20: error: no match for 'operator==' (operand types are 'const elem' and 'const elem') { return __x == __y; } ^ /usr/include/c++/4.8/bits/stl_function.h:208:20: note: candidates are: In file included from /usr/include/c++/4.8/iosfwd:40:0, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/postypes.h:216:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&) operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) ^ /usr/include/c++/4.8/bits/postypes.h:216:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::fpos<_StateT>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) ^ /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::pair<_T1, _T2>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template<class _Iterator> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) operator==(const reverse_iterator<_Iterator>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::reverse_iterator<_Iterator>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator==(const reverse_iterator<_IteratorL>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::reverse_iterator<_Iterator>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:1031:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&) operator==(const move_iterator<_IteratorL>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1031:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::move_iterator<_Iterator>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:1037:5: note: template<class _Iterator> bool std::operator==(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&) operator==(const move_iterator<_Iterator>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1037:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::move_iterator<_Iterator>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/allocator.h:128:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&) operator==(const allocator<_T1>&, const allocator<_T2>&) ^ /usr/include/c++/4.8/bits/allocator.h:128:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::allocator<_CharT>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/allocator.h:133:5: note: template<class _Tp> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&) operator==(const allocator<_Tp>&, const allocator<_Tp>&) ^ /usr/include/c++/4.8/bits/allocator.h:133:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::allocator<_CharT>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&) operator==(const basic_string<_CharT>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::basic_string<_CharT>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const _CharT* __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: mismatched types 'const _CharT*' and 'elem' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0, from /usr/include/c++/4.8/bits/basic_ios.h:37, from /usr/include/c++/4.8/ios:44, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template<class _CharT, class _Traits> bool std::operator==(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&) operator==(const istreambuf_iterator<_CharT, _Traits>& __a, ^ /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/tuple:39:0, from /usr/include/c++/4.8/unordered_map:41, from npath.cpp:2: /usr/include/c++/4.8/array:228:5: note: template<class _Tp, unsigned int _Nm> bool std::operator==(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&) operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) ^ /usr/include/c++/4.8/array:228:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::array<_Tp, _Nm>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/unordered_map:41:0, from npath.cpp:2: /usr/include/c++/4.8/tuple:813:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&) operator==(const tuple<_TElements...>& __t, ^ /usr/include/c++/4.8/tuple:813:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::tuple<_Elements ...>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/unordered_map:48:0, from npath.cpp:2: /usr/include/c++/4.8/bits/unordered_map.h:1388:5: note: template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> bool std::operator==(const std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&, const std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&) operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/unordered_map.h:1388:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>' { return __x == __y; } ^ In file included from /usr/include/c++/4.8/unordered_map:48:0, from npath.cpp:2: /usr/include/c++/4.8/bits/unordered_map.h:1400:5: note: template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> bool std::operator==(const std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&, const std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&) operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/unordered_map.h:1400:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from npath.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:208:20: note: 'const elem' is not derived from 'const std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>' { return __x == __y; } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema npath 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ă.