Submission #984744

#TimeUsernameProblemLanguageResultExecution timeMemory
984744Uultan12Permutation (APIO22_perm)C++17
Compilation error
0 ms0 KiB
#include <random> std::vector<int> construct_permutation(long long k) { std::vector<int> permutation(k); for (int i = 0; i < k; ++i) { permutation[i] = i; } std::shuffle(permutation.begin(), permutation.end(), std::mt19937(std::random_device()())); return permutation; }

Compilation message (stderr)

perm.cpp: In function 'std::vector<int> construct_permutation(long long int)':
perm.cpp:8:10: error: 'shuffle' is not a member of 'std'
    8 |     std::shuffle(permutation.begin(), permutation.end(), std::mt19937(std::random_device()()));
      |          ^~~~~~~