📜  rng cpp - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:50.110000             🧑  作者: Mango

代码示例1
// Add thus to with the headers
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// Generate a function that will give values between l and r inclusive
auto dist = uniform_int_distribution(l, r);
// get the random number using dist(rng);