# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
975946 | Orifkhon | Permutation (APIO22_perm) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// Source: https://usaco.guide/general/io
#include <bits/stdc++.h>
using namespace std;
vector<int> construct_permutation(long long k) {
vector<int> arr(k - 1);
for(int i = 0; i <= k - 2; i++){
arr[i] = i;
}
return arr;
}
int main(){
int k;
cin >> k;
vector<int> perm = construct_permutation(k);
for(int i = 0; i < perm.size(); i++){
cout << perm[i] << ' ';
}
}