maomao90's Library
A C++20 library for competitive programming.
Loading...
Searching...
No Matches
splitmix.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace maomao90 {
4constexpr unsigned long long splitmix64(unsigned long long x) {
5 // http://xorshift.di.unimi.it/splitmix64.c
6 x += 0x9e3779b97f4a7c15;
7 x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
8 x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
9 return x ^ (x >> 31);
10}
11} // namespace maomao90
Definition hashmap.hpp:8
constexpr unsigned long long splitmix64(unsigned long long x)
Definition splitmix.hpp:4