제출 #874671

#제출 시각아이디문제언어결과실행 시간메모리
874671serifefedartar순열 (APIO22_perm)C++17
0 / 100
0 ms348 KiB
#include <bits/stdc++.h> #include <perm.h> using namespace std; #define fast ios::sync_with_stdio(0);cin.tie(0); #define s second #define f first typedef long long ll; const ll MOD = 1e9+7; const ll LOGN = 20; const ll MAXN = 1e5 + 100; vector<int> construct_permutation(ll k) { vector<int> v; int extra = -1, last = 0; for (int i = 60; i >= 0; i--) { if ((1LL<<i) & k) { last++; for (int j = last+i-1; j >= last; j--) v.push_back(j); last = last + i - 1; extra++; } } while (extra) { last++; v.push_back(last); extra--; } reverse(v.begin(), v.end()); return v; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...