| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1264478 | XXBabaProBerkay | Permutation (APIO22_perm) | C++17 | 1 ms | 328 KiB |
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
using ll = long long;
const int INF = 1e9 + 7;
const int MOD = 998244353;
vector<int> construct_permutation(ll k)
{
vector<int> ans;
int a = 0, b = -1;
bool o = 0;
for (int i = 63; i >= 0; i--)
{
if ((k & (1ll << i)) && !o)
{
o = 1;
continue;
}
if (!o)
continue;
ans.push_back(a);
a++;
if (k & (1ll << i))
{
ans.push_back(b);
b--;
}
}
for (int &i : ans)
i += -b - 1;
return ans;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
