| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1362719 | hihi0908 | 순열 (APIO22_perm) | C++20 | 0 ms | 344 KiB |
#include "perm.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
std::vector<int> construct_permutation(long long k) {
vector<int> p;
vector<int> bits;
long long s = 0;
for(int i = 0; i < 64; i++){
if((1ll << i) & k){
bits.pb(i);
s += i;
}
}
s--;
for(int i : bits){
int cnt = s - i + 1;
for(int j = cnt; j <= s; j++) p.pb(j);
s -= i;
}
reverse(p.begin(), p.end());
return p;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
