Submission #975926

#TimeUsernameProblemLanguageResultExecution timeMemory
975926OrifkhonPermutation (APIO22_perm)C++17
Compilation error
0 ms0 KiB
vector<int> construct_permutation(long long k) { int z = __lg(k); vector<int> p(z); iota(p.begin(), p.end(), 0); for (int i = z - 1; i >= 0; i--) { if ((k >> i) & 1) { p.insert(p.begin() + i, z++); } } return p; }

Compilation message (stderr)

perm.cpp:1:1: error: 'vector' does not name a type
    1 | vector<int> construct_permutation(long long k) {
      | ^~~~~~