Submission #984748

#TimeUsernameProblemLanguageResultExecution timeMemory
984748Uultan12Permutation (APIO22_perm)C++17
Compilation error
0 ms0 KiB
#include <vector> std::vector<int> construct_permutation(int64_t k) { int n = 0; while ((n * (n + 1)) / 2 < k) { ++n; } std::vector<int> permutation(n); for (int i = 0; i < n; ++i) { permutation[i] = i; } return permutation; }

Compilation message (stderr)

perm.cpp:3:40: error: 'int64_t' was not declared in this scope
    3 | std::vector<int> construct_permutation(int64_t k) {
      |                                        ^~~~~~~
perm.cpp:3:51: error: expected ',' or ';' before '{' token
    3 | std::vector<int> construct_permutation(int64_t k) {
      |                                                   ^