We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a4d768 commit cf0edadCopy full SHA for cf0edad
cp-algo/random/rng.hpp
@@ -3,11 +3,11 @@
3
#include <chrono>
4
#include <random>
5
namespace cp_algo::random {
6
+ std::mt19937_64 gen(
7
+ std::chrono::steady_clock::now().time_since_epoch().count()
8
+ );
9
uint64_t rng() {
- static std::mt19937_64 rng(
- std::chrono::steady_clock::now().time_since_epoch().count()
- );
10
- return rng();
+ return gen();
11
}
12
13
#endif // CP_ALGO_RANDOM_RNG_HPP
0 commit comments