mt19937 -- 高质量随机数

优点:产生速度快, 周期大

用法:

#include<bits/stdc++.h>
using namespace std;

int main() {
    mt19937 mt_rand(time(0));
    cout << mt_rand() << endl;
   cout << mt19937(time(0))() << endl;   shuffle(a
+1, a+1+n, mt_rand); return 0; }

 

posted @ 2018-11-09 15:54  Wisdom+.+  阅读(4452)  评论(0编辑  收藏  举报