#4267
PerechiPuncte
Se dau n
puncte în plan, nu neapărat distincte, fiecare punct fiind dat prin coordonatele sale (x, y)
, unde x
și y
sunt numere naturale. Spunem că două puncte (x, y)
și (i, j)
sunt simetrice dacă x = j
și y = i
. Să se determine numărul perechilor de puncte simetrice.
Folclorul informatic
Problema | PerechiPuncte | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.7 secunde | Limita memorie |
Total: 128 MB
/
Stivă 64 MB
|
Id soluție | #49299799 | Utilizator | |
Fișier | perechipuncte.cpp | Dimensiune | 593 B |
Data încărcării | 25 Februarie 2024, 08:02 | 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 perechipuncte.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h: In instantiation of 'struct std::__detail::_Hash_code_base<std::unordered_map<int, int>, std::pair<const std::unordered_map<int, int>, int>, std::__detail::_Select1st, std::hash<std::unordered_map<int, int> >, 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<std::unordered_map<int, int>, std::pair<const std::unordered_map<int, int>, int>, std::__detail::_Select1st, std::equal_to<std::unordered_map<int, int> >, std::hash<std::unordered_map<int, int> >, 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<std::unordered_map<int, int>, std::pair<const std::unordered_map<int, int>, int>, std::allocator<std::pair<const std::unordered_map<int, int>, int> >, std::__detail::_Select1st, std::equal_to<std::unordered_map<int, int> >, std::hash<std::unordered_map<int, int> >, 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<std::unordered_map<int, int>, int>' perechipuncte.cpp:11:43: required from here /usr/include/c++/4.8/bits/hashtable_policy.h:1070:12: error: invalid use of incomplete type 'struct std::hash<std::unordered_map<int, int> >' 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from perechipuncte.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<std::unordered_map<int, int> >' 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 perechipuncte.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h:1070:12: error: invalid use of incomplete type 'struct std::hash<std::unordered_map<int, int> >' 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from perechipuncte.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<std::unordered_map<int, int> >' 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 perechipuncte.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h:1082:53: error: invalid use of incomplete type 'struct std::hash<std::unordered_map<int, int> >' 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from perechipuncte.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<std::unordered_map<int, int> >' 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 perechipuncte.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h:1082:53: error: invalid use of incomplete type 'struct std::hash<std::unordered_map<int, int> >' 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from perechipuncte.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<std::unordered_map<int, int> >' struct hash; ^ perechipuncte.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 = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::unordered_map<int, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::unordered_map<int, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::unordered_map<int, int>, int> >]': perechipuncte.cpp:11:43: error: invalid use of incomplete type 'std::unordered_map<std::unordered_map<int, int>, int>::hasher {aka struct std::hash<std::unordered_map<int, int> >}' unordered_map<unordered_map<int,int>,int> mp; ^ 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from perechipuncte.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'std::unordered_map<std::unordered_map<int, int>, int>::hasher {aka struct std::hash<std::unordered_map<int, int> >}' struct hash; ^ perechipuncte.cpp:11:43: 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 = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::unordered_map<int, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::unordered_map<int, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::unordered_map<int, int>, int> >] unordered_map<unordered_map<int,int>,int> mp; ^ perechipuncte.cpp: In function 'int main()': perechipuncte.cpp:24:7: error: no match for 'operator[]' (operand types are 'std::unordered_map<std::unordered_map<int, int>, int>' and 'int') mp[x1][y1]++; ^ perechipuncte.cpp:24:7: note: candidates are: In file included from /usr/include/c++/4.8/unordered_map:48:0, from perechipuncte.cpp:2: /usr/include/c++/4.8/bits/unordered_map.h:595:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = std::unordered_map<int, int>] operator[](const key_type& __k) ^ /usr/include/c++/4.8/bits/unordered_map.h:595:7: note: no known conversion for argument 1 from 'int' to 'const key_type& {aka const std::unordered_map<int, int>&}' /usr/include/c++/4.8/bits/unordered_map.h:599:7: note: 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 = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = std::unordered_map<int, int>] operator[](key_type&& __k) ^ /usr/include/c++/4.8/bits/unordered_map.h:599:7: note: no known conversion for argument 1 from 'int' to 'std::unordered_map<std::unordered_map<int, int>, int>::key_type&& {aka std::unordered_map<int, int>&&}' perechipuncte.cpp:25:7: error: no match for 'operator[]' (operand types are 'std::unordered_map<std::unordered_map<int, int>, int>' and 'int') mp[x2][y2]++; ^ perechipuncte.cpp:25:7: note: candidates are: In file included from /usr/include/c++/4.8/unordered_map:48:0, from perechipuncte.cpp:2: /usr/include/c++/4.8/bits/unordered_map.h:595:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = std::unordered_map<int, int>] operator[](const key_type& __k) ^ /usr/include/c++/4.8/bits/unordered_map.h:595:7: note: no known conversion for argument 1 from 'int' to 'const key_type& {aka const std::unordered_map<int, int>&}' /usr/include/c++/4.8/bits/unordered_map.h:599:7: note: 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 = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = std::unordered_map<int, int>] operator[](key_type&& __k) ^ /usr/include/c++/4.8/bits/unordered_map.h:599:7: note: no known conversion for argument 1 from 'int' to 'std::unordered_map<std::unordered_map<int, int>, int>::key_type&& {aka std::unordered_map<int, int>&&}' perechipuncte.cpp:35:16: error: no match for 'operator[]' (operand types are 'std::unordered_map<std::unordered_map<int, int>, int>' and 'int') sol+=mp[y3][x3]; ^ perechipuncte.cpp:35:16: note: candidates are: In file included from /usr/include/c++/4.8/unordered_map:48:0, from perechipuncte.cpp:2: /usr/include/c++/4.8/bits/unordered_map.h:595:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = std::unordered_map<int, int>] operator[](const key_type& __k) ^ /usr/include/c++/4.8/bits/unordered_map.h:595:7: note: no known conversion for argument 1 from 'int' to 'const key_type& {aka const std::unordered_map<int, int>&}' /usr/include/c++/4.8/bits/unordered_map.h:599:7: note: 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 = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = std::unordered_map<int, int>] operator[](key_type&& __k) ^ /usr/include/c++/4.8/bits/unordered_map.h:599:7: note: no known conversion for argument 1 from 'int' to 'std::unordered_map<std::unordered_map<int, int>, int>::key_type&& {aka std::unordered_map<int, int>&&}' perechipuncte.cpp:36:11: error: no match for 'operator[]' (operand types are 'std::unordered_map<std::unordered_map<int, int>, int>' and 'int') mp[x3][y3]++; ^ perechipuncte.cpp:36:11: note: candidates are: In file included from /usr/include/c++/4.8/unordered_map:48:0, from perechipuncte.cpp:2: /usr/include/c++/4.8/bits/unordered_map.h:595:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = std::unordered_map<int, int>] operator[](const key_type& __k) ^ /usr/include/c++/4.8/bits/unordered_map.h:595:7: note: no known conversion for argument 1 from 'int' to 'const key_type& {aka const std::unordered_map<int, int>&}' /usr/include/c++/4.8/bits/unordered_map.h:599:7: note: 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 = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = std::unordered_map<int, int>] operator[](key_type&& __k) ^ /usr/include/c++/4.8/bits/unordered_map.h:599:7: note: no known conversion for argument 1 from 'int' to 'std::unordered_map<std::unordered_map<int, int>, int>::key_type&& {aka std::unordered_map<int, int>&&}' In file included from /usr/include/c++/4.8/bits/hashtable.h:35:0, from /usr/include/c++/4.8/unordered_map:47, from perechipuncte.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_base(const _ExtractKey&, const _H1&, const _H2&, const std::__detail::_Default_ranged_hash&) [with _Key = std::unordered_map<int, int>; _Value = std::pair<const std::unordered_map<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _H1 = std::hash<std::unordered_map<int, int> >; _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 = std::unordered_map<int, int>; _Value = std::pair<const std::unordered_map<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::unordered_map<int, int> >; _H1 = std::hash<std::unordered_map<int, int> >; _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 = std::unordered_map<int, int>; _Value = std::pair<const std::unordered_map<int, int>, int>; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::unordered_map<int, int> >; _H1 = std::hash<std::unordered_map<int, int> >; _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 std::unordered_map<int, int>, 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 = std::unordered_map<int, int>; _Value = std::pair<const std::unordered_map<int, int>, int>; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::unordered_map<int, int> >; _H1 = std::hash<std::unordered_map<int, int> >; _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<std::unordered_map<int, int> >; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::allocator_type = std::allocator<std::pair<const std::unordered_map<int, int>, 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 = std::unordered_map<int, int>; _Tp = int; _Hash = std::hash<std::unordered_map<int, int> >; _Pred = std::equal_to<std::unordered_map<int, int> >; _Alloc = std::allocator<std::pair<const std::unordered_map<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::unordered_map<int, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::unordered_map<int, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::unordered_map<int, int>, int> >]' perechipuncte.cpp:11:43: required from here /usr/include/c++/4.8/bits/hashtable_policy.h:1099:63: error: invalid use of incomplete type 'struct std::hash<std::unordered_map<int, int> >' : __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/ostream:38, from /usr/include/c++/4.8/iostream:39, from perechipuncte.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<std::unordered_map<int, int> >' 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 perechipuncte.cpp:2: /usr/include/c++/4.8/bits/hashtable_policy.h:1099:63: error: invalid use of incomplete type 'struct std::hash<std::unordered_map<int, int> >' : __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/ostream:38, from /usr/include/c++/4.8/iostream:39, from perechipuncte.cpp:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<std::unordered_map<int, int> >' struct hash; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PerechiPuncte 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ă.