# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
916439 | Jakub_Wozniak | Permutation (APIO22_perm) | C++17 | 0 ms | 444 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.
#include <bits/stdc++.h>
using namespace std;
vector <pair<int,int>> V;
vector<int> construct_permutation(long long n)
{
if(n == 1)return {};
if(n == 2)return {0};
if(n == 3)return {1,0};
if(n == 4)return {0,1};
long long MAX = 300;
vector <int> v;
int B;
int R = n%3;
int r[200];
n /= 3;
if(R)v.push_back(R);
while (n)
{
if(n < 4)
{
if(n < 2)break;
if (n % 4 == 3) v.push_back(1);
v.push_back(MAX);
MAX--;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |