#include <iostream>
#include <algorithm>
#include <random>
#include <vector>
int main() {
std::vector<int> arr = {1, 2, 3, 4, 5};
// 创建随机数引擎
std::random_device rd;
std::mt19937 rng(rd());
// 使用shuffle函数打乱数组
std::shuffle(arr.begin(), arr.end(), rng);
// 输出打乱后的数组
for (const auto& num : arr) {
std::cout << num << " ";
}
std::cout << std::endl;
return 0;
}