Submission #1117741

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11177412024-11-24 07:56:39ereringPermutation (APIO22_perm)C++17
0 / 100
1 ms336 KiB
#include <bits/stdc++.h>
//#include "perm.h"
using namespace std;
#define endl '\n'
#define pb push_back
vector<int> construct_permutation(long long k)
{
long long a[300];
for(int i=0;i<300;i++)a[i]=0;
long long cnt=1,f=0;
for(long long i=62;i>=0;i--){
if((k>>i)&1){
if(cnt==1){
for(int j=1;cnt<=i;j+=2){
a[j]=cnt++;
a[j]+=200;
}
f=2;
continue;
}
else{
a[f]=-1;
}
f+=2;
}
}
vector<int> v;
int s=1;
for(int i=299;i>=0;i--){
if(a[i]==-1)a[i]=s++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...