默认生成一个uint_32。
mt19937 rnd(time(0));
uint mx = 0, mi = -1;
printf("n=%d\n", n);
for(int i = 1; i <= n; ++i) {
uint res = rnd();
cmax(mx, res);
cmin(mi, res);
}
printf("mi=%u mx=%u\n", mi, mx);
// n=200000000
// mi=2 mx=4294967253
mt19937_64 rnd(time(0));
ull mx = 0, mi = -1;
printf("n=%d\n", n);
for(int i = 1; i <= n; ++i) {
ull res = rnd();
cmax(mx, res);
cmin(mi, res);
}
printf("mi=%llu mx=%llu\n", mi, mx);
// n=200000000
// mi=48815069219 mx=18446744008811123758