void fun(int n) { for(int i = n - 1; i >= 1; i--) swap(num[i], num[rand()%(i+1)]); } 转载于:https://www.cnblogs.com/yangzhouyyz/p/5211504.html