# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
572596 | arthur_nascimento | 순열 (APIO22_perm) | C++17 | 3 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pb push_back
using namespace std;
std::vector<int> construct_permutation(long long k)
{
// k++;
ll aux = k, sz = 0;
while(aux)
aux /= 2, sz++;
vector<pii> ans;
for(int i=0;i<sz-1;i++)
ans.pb({2*i,i+1});
vector<int> dec;
dec.pb(1);
int x = 1, y = 0, skip = 0;
for(int i=sz-2;i>=0;i--, x += 2, y--){
if((k & (1ll << i)) == 0) continue;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |