| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1358716 | vahagng | 순열 (APIO22_perm) | C++20 | 1 ms | 344 KiB |
#include "perm.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> construct_permutation(long long k){
vector<int> res;
int mx = -1;
for(int i = 61; i >= 0; i--){
if(k & (1ll << i)){
mx = i;
break;
}
}
res.resize(mx);
iota(res.begin(), res.end(), 0);
int cur = mx;
for(int i = mx - 1; i >= 0; i--){
if(k & (1ll << i)){
res.insert(res.begin() + i, cur++);
}
}
return res;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
