| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1356230 | nathlol2 | 순열 (APIO22_perm) | C++20 | 1 ms | 348 KiB |
#include "perm.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
vector<int> construct_permutation(ll k){
vector<int> ans;
ll c = 1;
int cc = 0;
while(c * 2 <= k){
ans.push_back(cc++);
c *= 2;
}
k -= c;
for(ll b = 60;b>=0;b--){
if(k & (1LL << b)){
ans.push_back(ans[b]);
for(int i = b;i<cc;i++) ans[i]++;
++cc;
}
}
return ans;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
