class Split_Mix64 {
public:
static ull mix(ull x) {
x += 0x9e3779b97f4a7c15ULL;
x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9ULL;
x = (x ^ (x >> 27)) * 0x94d049bb133111ebULL;
return x ^ (x >> 31);
}
};
class Hash_For_PII {
public:
size_t operator()(PII x) const {
static const ull seed =
(ull)chrono::steady_clock::now().time_since_epoch().count()
^ 0xbf58476d1ce4e5b9ULL;
ull h1 = Split_Mix64::mix((ull)x.first + seed);
ull h2 = Split_Mix64::mix((ull)x.second + seed + 0x9e3779b97f4a7c15ULL);
ull h = h1 ^ (h2 + 0x9e3779b97f4a7c15ULL + (h1 << 6) + (h1 >> 2));
return (size_t)Split_Mix64::mix(h);
}
};
//gp_hash_table<PII, int, HASH_FOR_PII>