摘要: int count = 1000; int[] arrNum = new int[count]; for (int i = 0; i < count; i++) { arrNum[i] = i + 1; } //打乱 Random rm = new Random(); for (int i = 0; i < count; i++) { int rmNum = rm.Next(i, count); int temp = arrNum[i]; arrNum[i] = arrNum[rmNum]; arrNum[rmNum] = temp; }---------------------- 阅读全文
posted @ 2011-03-29 16:52 panzhilei 阅读(1338) 评论(0) 推荐(0) 编辑