摘要: 先看看肖舸老师的文章:《随机洗牌算法复杂度的比较实例》http://tonyxiaohome.blog.51cto.com/blog/925273/313362其实我最初想到的也是那3个方法:1判断生成的随机数有没有重复,2.生成一张布尔表,3.双随机数。下面给出我的算法:#include <iostream>#include <vector>#include <time.h>using namespace std;void RandCard(vector<int>, int); //函数声明int main(int argc, char *ar 阅读全文
posted @ 2011-11-18 17:31 Zollty 阅读(367) 评论(0) 推荐(0) 编辑