제출 #862481

#제출 시각아이디문제언어결과실행 시간메모리
862481JakobZorz순열 (APIO22_perm)C++17
0 / 100
0 ms344 KiB
#include<iostream> #include"perm.h" using namespace std; typedef long long ll; vector<int>construct_permutation(ll k){ if(k==1) return {}; if(k==2) return {0}; for(int p:{2,3,5,7,11,13,17,19,23}){ if(p%k==0&&p<k){ auto a=construct_permutation(p); auto b=construct_permutation(k/p); for(int i:b) a.push_back(i+(int)a.size()); return a; } } auto a=construct_permutation(k/2); a.push_back((int)a.size()); a.insert(a.begin(),(int)a.size()); return a; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...