| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1364892 | ahmetlbktd4 | Permutation (APIO22_perm) | C++20 | 1 ms | 344 KiB |
#include "perm.h"
#include "bits/stdc++.h"
#define ll long long
using namespace std;
vector <int> construct_permutation(ll k){
int n = __lg(k);
vector <int> p(n);
iota(p.begin(),p.end(),0);
for (int i = n-1;i >= 0;i--){
if (k>>i&1){
p.insert(p.begin()+i,n);
n++;
}
}
return p;
}
//int main(){
// ll k;
// cin >> k;
// vector <int> p = construct_permutation(k);
// for (auto x : p){
// cout << x << " ";
// }
//}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
