# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
993598 | abczz | Permutation (APIO22_perm) | C++17 | 25 ms | 472 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"
#include <iostream>
#define ll long long
using namespace std;
vector <int> base2(ll k) {
vector <int> V;
ll mxbit = 0, cnt = 0;
for (int i=59; i>=0; --i) {
if (k & (1LL<<i)) {
mxbit = i;
break;
}
}
for (int j=0; j<mxbit; ++j) {
if (k & (1LL<<j)) V.push_back(-1);
V.push_back(++cnt);
}
ll x = V.size();
for (auto &u : V) {
if (u == -1) u = x--;
--u;
}
return V;
}
vector <int> base3(ll k) {
vector <int> V, U;
ll cnt = 0;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |