# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1164068 | just | Permutation (APIO22_perm) | C++20 | 338 ms | 50580 KiB |
#include "bits/stdc++.h"
using namespace std;
#define all(x) (x).begin(), (x).end()
#define vec vector
#define int long long
vec<int> solve(int k) {
k--;
vec<int> ans(k);
iota(all(ans), 0);
reverse(all(ans));
return ans;
}
vec<signed> construct_permutation(int k) {
vec<int> ans = solve(k);
int n = ans.size();
vec<signed> res(n);
for(int i = 0; i < n; i++) {
res[i] = ans[i];
}
return res;
}
#ifdef DEBUG
signed main() {}
#endif
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |