| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1362460 | aaaaaaaa | Permutation (APIO22_perm) | C++20 | 1 ms | 344 KiB |
#include <bits/stdc++.h>
#include "perm.h"
using namespace std;
vector<int> construct_permutation(long long k) {
int l = __lg(k);
vector <int> a(l);
for (int i = 0; i < l; ++i) a[i] = i;
assert((k >> l) & 1);
for (int i = l - 1; i >= 0; --i) {
if ((k >> i) & 1) {
a.insert(a.begin() + i, (int) a.size());
}
}
return a;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
