| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1366712 | ezzzay | 순열 (APIO22_perm) | C++20 | 4 ms | 1348 KiB |
#include "perm.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
std::vector<int> construct_permutation(long long k){
k--;
vector<int>vc;
int n=0;
while(k){
for(int i=60;i>=1;i--){
if( k>= (1ll<<i)-1){
k-=(1ll<<i)-1 ;
n+=i;
vc.pb(i);
break;
}
}
}
n--;
vector<int>ans;
for(auto a:vc){
for(int j=a-1;j>=0;j--){
ans.pb(n-j);
}
n-=a;
}
return ans;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
