| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 745132 | Desh03 | Permutation (APIO22_perm) | C++17 | 2 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
vector<int> construct_permutation(long long k) {
int lg = 0;
while ((1LL << (lg + 1)) <= k) ++lg;
vector<int> ans(lg, -1), ret;
int j = lg;
for (int i = lg - 1; i >= 0; --i)
if (k >> i & 1)
ans[i] = j++;
for (int i = 0; i < lg; i++) {
if (ans[i] ^ -1) ret.push_back(ans[i]);
ret.push_back(i);
}
return ret;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
