1 | initial version |
#include <algorithm> // std::random_shuffle
#include <vector> // std::vector
#include <cstdlib> // std::rand, std::srand
vector<int> permutation = 1, 2, 3, ..., 10
std::random_shuffle(permutation.begin(), permutation.end());