답안 #984745

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
984745 2024-05-17T04:26:17 Z Uultan12 순열 (APIO22_perm) C++17
컴파일 오류
0 ms 0 KB
#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

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