| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 862471 | JakobZorz | 순열 (APIO22_perm) | C++17 | 1 ms | 436 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<iostream>
#include"perm.h"
using namespace std;
typedef long long ll;
vector<int>construct_permutation(ll k){
int num_pow=2;
while((1LL<<num_pow)<=k){
num_pow++;
}
num_pow--;
vector<int>res;
k-=1LL<<num_pow;
int curr=num_pow;
for(int i=0;i<num_pow;i++)
if(k&(1LL<<i))
curr++;
for(int i=0;i<num_pow;i++){
if(k&(1LL<<i)){
res.push_back(--curr);
}
res.push_back(i);
}
/*for(int i:res)
cout<<i<<" ";
cout<<"\n";*/
return res;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
