| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1286357 | papaulo | Permutation (APIO22_perm) | C++20 | 2 ms | 580 KiB |
#include "perm.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<int> construct_permutation(ll k)
{
vector<int> ans;
bool started=false;
for(ll i=63;i>=0;i--) {
if(started) {
for(auto &v : ans) v++;
ans.push_back(0);
}
if((k>>i)&1) {
if(started) ans.push_back((int)ans.size());
else started=true;
}
}
reverse(ans.begin(), ans.end());
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
