| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1201680 | adiyer | Permutation (APIO22_perm) | C++20 | 7 ms | 1092 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector < int > construct_permutation(ll k){
k--;
int x = 0, y = 0;
vector < int > ans[60];
for(ll bit = 59; bit >= 1; bit--){
while(k >= (1ll << bit) - 1){
k -= (1ll << bit) - 1, x++;
for(int i = 0; i < bit; i++) ans[x].push_back(y++);
}
}
for(int i = x; i >= 1; i--){
for(int val : ans[i]){
ans[0].push_back(val);
}
}
return ans[0];
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
