제출 #838539

#제출 시각아이디문제언어결과실행 시간메모리
838539finn__순열 (APIO22_perm)C++17
0 / 100
107 ms262144 KiB
#include <bits/stdc++.h> #include "perm.h" using namespace std; vector<int> construct_permutation(long long k) { if (k == 1) return {}; for (int q : {2, 3, 5, 7, 11, 13, 17, 19, 23}) if (!(k % q)) { auto p = construct_permutation(k / q); auto s = construct_permutation(q); for (int &x : s) x += p.size(); p.insert(p.end(), s.begin(), s.end()); return p; } auto p = construct_permutation(k >> 1); p.push_back(p.size()); p.insert(p.begin(), p.size()); return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...