제출 #984750

#제출 시각아이디문제언어결과실행 시간메모리
984750Uultan12순열 (APIO22_perm)C++17
컴파일 에러
0 ms0 KiB
#include <vector> #include <algorithm> std::vector<int> construct_permutation(int64_t k) { int n = 1; while ((n * (n + 1)) / 2 < k) { ++n; } std::vector<int> permutation(n); for (int i = 0; i < k; ++i) { permutation[i] = i; } // Fill the remaining elements with values not used in the increasing subsequence int next_value = k; for (int i = k; i < n; ++i) { permutation[i] = next_value++; } return permutation; }

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

/usr/bin/ld: /tmp/ccmSganN.o: in function `main':
grader.cpp:(.text.startup+0x240): undefined reference to `construct_permutation(long long)'
collect2: error: ld returned 1 exit status