www.qmcl.net > stDrAnDom.shuFFlE

stDrAnDom.shuFFlE

默认的random_shuffle用的是和rand()一样的随机数发生器,所以你需要用srand()来设置随机数种子。

random_shuffle有两种形式,即 templatevoid random_shuffle(RandomAccessIterator first, RandomAccessIterator last);和 templatevoid random_shuffle(RandomAccessIterator first, RandomAccessIterator last, RandomNumberGenerator&& rnd);...

网站地图

All rights reserved Powered by www.qmcl.net

copyright ©right 2010-2021。
www.qmcl.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com