# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
740873 | LittleCube | Permutation (APIO22_perm) | C++17 | 2 ms | 344 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 "perm.h"
#ifndef EVAL
#include "perm_grader.cpp"
#endif
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
vector<int> construct_permutation(long long k)
{
vector<int> f, s, dp;
int n = 0;
ll ans = 0;
while (k > 1)
{
if (k % 3 == 0)
{
f.emplace_back(n + 1);
f.emplace_back(n);
n += 2;
k /= 3;
}
// else if(k % 3 == 0)
// {
// f.emplace_back(n);
// f.emplace_back(n + 1);
// n++;
// }
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |