제출 #583989

#제출 시각아이디문제언어결과실행 시간메모리
583989YassineBenYounes순열 (APIO22_perm)C++17
컴파일 에러
0 ms0 KiB
int[] construct_permutation(ll k){ k--; k--; int arr[k+1]; int index = 0; for(int i = k; i >= 0;i--){ arr[index] = i; index++; } return arr; }

컴파일 시 표준 에러 (stderr) 메시지

perm.cpp:1:4: error: structured binding declaration cannot have type 'int'
    1 | int[] construct_permutation(ll k){
      |    ^~
perm.cpp:1:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
perm.cpp:1:4: error: empty structured binding declaration
perm.cpp:1:7: error: expected initializer before 'construct_permutation'
    1 | int[] construct_permutation(ll k){
      |       ^~~~~~~~~~~~~~~~~~~~~