# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
969595 | akacool445k | Permutation (APIO22_perm) | C++17 | 2 ms | 496 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>
#include "perm.h"
using namespace std;
// #define int long long
#define ll long long
#define ff first
#define ss second
#define fast ios_base::sync_with_stdio(NULL); cin.tie(NULL)
const double inf = 1e18 + 9;
const int mxn = 2e5 + 2;
const int mod = 1e9 + 7;
vector<int> construct_permutation(long long k) {
vector<int> v;
int cnt1 = 0;
int cnt2 = 0;
long long tmp = k;
while(tmp > 1) {
if(tmp % 2 == 0) {
tmp = tmp / 2;
cnt1++;
} else {
tmp--;
cnt1++;
}
}
cnt1--;
while(k > 1) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |