| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1201226 | aykhn | 순열 (APIO22_perm) | C++20 | 1 ms | 328 KiB |
#include "perm.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> construct_permutation(long long k)
{
int b = 0;
while ((1LL << (b + 1)) <= k) b++;
vector<int> res;
for (int i = b - 1; i >= 0; i--)
{
res.insert(res.begin(), -1);
for (int &j : res) j++;
if (k >> i & 1) res.insert(res.begin(), *max_element(res.begin(), res.end()) + 1);
}
return res;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
