Submission #984745

#TimeUsernameProblemLanguageResultExecution timeMemory
984745Uultan12Permutation (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::next_permutation(permutation.begin(), permutation.end()); return permutation; }

Compilation message (stderr)

perm.cpp: In function 'std::vector<int> construct_permutation(long long int)':
perm.cpp:9:10: error: 'next_permutation' is not a member of 'std'; did you mean 'is_permutation'?
    9 |     std::next_permutation(permutation.begin(), permutation.end());
      |          ^~~~~~~~~~~~~~~~
      |          is_permutation