Advertisement
Abrar_Al_Samit

HashMap

Mar 23rd, 2023 (edited)
876
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <ext/pb_ds/assoc_container.hpp>
  2. using namespace __gnu_pbds;
  3. struct splitmix64 {
  4.     size_t operator()(size_t x) const {
  5.         static const size_t fixed = chrono::steady_clock::now().time_since_epoch().count();
  6.         x += 0x9e3779b97f4a7c15 + fixed;
  7.         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
  8.         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
  9.         return x ^ (x >> 31);
  10.     }
  11. };
  12. gp_hash_table<int, int, splitmix64> dp[N];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement