| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1350589 | zoharn | Permutation (APIO22_perm) | C++20 | 43 ms | 12332 KiB |
using namespace std;
#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include "perm.h"
typedef long long ll;
std::vector<int> construct_permutation(long long k)
{
vector<int> ans1, ans2, ans;
ll m = floor(log2(k));
int n = k - (pow(2, m));
for(int j = 0; j < n; j++) ans2.push_back(j+m);
reverse(ans2.begin(), ans2.end());
for(int d = 0; d < m; d++) ans2.push_back(d);
return ans2;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
