Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef std::pair<int, int> Tp;
- namespace std
- {
- template <>
- struct hash<Tp>
- {
- size_t operator()( const Tp& k ) const
- {
- // Compute individual hash values for first, second and third
- // http://stackoverflow.com/a/1646913/126995
- size_t res = k.first * (1 << 16 + 3) + k.second + 5;
- return res;
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement