lmori's Library

This documentation is automatically generated by competitive-verifier/competitive-verifier

View the Project on GitHub lmorinn/library

:heavy_check_mark: Xorshift
(other/Xorshift.hpp)

概要

todo

計算量

todo

Required by

Verified with

Code

inline static unsigned long long seed = 1235;
unsigned long long rand_gen(long long p) {
  unsigned long long x = seed;
  x ^= x << 13;
  x ^= x >> 7;
  x ^= x << 17;
  seed = x;
  return seed % p;
}
#line 1 "other/Xorshift.hpp"
inline static unsigned long long seed = 1235;
unsigned long long rand_gen(long long p) {
  unsigned long long x = seed;
  x ^= x << 13;
  x ^= x >> 7;
  x ^= x << 17;
  seed = x;
  return seed % p;
}
Back to top page