joioji.cpp: In function 'int main()':
joioji.cpp:39:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int x=0;x<s.size();x++){
~^~~~~~~~~
joioji.cpp:48:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int x=0;x<s.size();x++){
~^~~~~~~~~
joioji.cpp: In instantiation of 'size_t custom_hash::operator()(const std::pair<_T1, _T2>&) const [with T = int; U = int; size_t = long unsigned int]':
/usr/include/c++/7/bits/hashtable_policy.h:1368:23: required from '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 = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _H1 = custom_hash; _H2 = std::__detail::_Mod_range_hashing; std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::__hash_code = long unsigned int]'
/usr/include/c++/7/bits/hashtable_policy.h:744:19: 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 = std::pair<int, int>; _Pair = std::pair<const std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; _Equal = std::equal_to<std::pair<int, int> >; _H1 = custom_hash; _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 = std::pair<int, int>]'
/usr/include/c++/7/bits/unordered_map.h:980: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 = std::pair<int, int>; _Tp = int; _Hash = custom_hash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<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::pair<int, int>]'
joioji.cpp:37:31: required from here
joioji.cpp:17:25: error: no matching function for call to 'std::hash<int>::hash(const int&)'
return std::hash<T>(i.first) ^ std::hash<U>(i.second);
^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6575:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/stdexcept:39,
from /usr/include/c++/7/array:39,
from /usr/include/c++/7/tuple:39,
from /usr/include/c++/7/unordered_map:41,
from joioji.cpp:2:
/usr/include/c++/7/bits/functional_hash.h:148:3: note: candidate: constexpr std::hash<int>::hash()
_Cxx_hashtable_define_trivial_hash(int)
^
/usr/include/c++/7/bits/functional_hash.h:148:3: note: candidate expects 0 arguments, 1 provided
/usr/include/c++/7/bits/functional_hash.h:148:3: note: candidate: constexpr std::hash<int>::hash(const std::hash<int>&)
/usr/include/c++/7/bits/functional_hash.h:148:3: note: no known conversion for argument 1 from 'const int' to 'const std::hash<int>&'
/usr/include/c++/7/bits/functional_hash.h:148:3: note: candidate: constexpr std::hash<int>::hash(std::hash<int>&&)
/usr/include/c++/7/bits/functional_hash.h:148:3: note: no known conversion for argument 1 from 'const int' to 'std::hash<int>&&'
joioji.cpp:17:49: error: no matching function for call to 'std::hash<int>::hash(const int&)'
return std::hash<T>(i.first) ^ std::hash<U>(i.second);
^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6575:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/stdexcept:39,
from /usr/include/c++/7/array:39,
from /usr/include/c++/7/tuple:39,
from /usr/include/c++/7/unordered_map:41,
from joioji.cpp:2:
/usr/include/c++/7/bits/functional_hash.h:148:3: note: candidate: constexpr std::hash<int>::hash()
_Cxx_hashtable_define_trivial_hash(int)
^
/usr/include/c++/7/bits/functional_hash.h:148:3: note: candidate expects 0 arguments, 1 provided
/usr/include/c++/7/bits/functional_hash.h:148:3: note: candidate: constexpr std::hash<int>::hash(const std::hash<int>&)
/usr/include/c++/7/bits/functional_hash.h:148:3: note: no known conversion for argument 1 from 'const int' to 'const std::hash<int>&'
/usr/include/c++/7/bits/functional_hash.h:148:3: note: candidate: constexpr std::hash<int>::hash(std::hash<int>&&)
/usr/include/c++/7/bits/functional_hash.h:148:3: note: no known conversion for argument 1 from 'const int' to 'std::hash<int>&&'
joioji.cpp:27:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~