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 "messy.h"
#include<bits/stdc++.h>
using namespace std;
#define sz(v) ((int)(v).size())
typedef long long lint;
bool C;
vector<int> restore_permutation(int n, int w, int r) {
vector<int>ans;
for(int i=0;i<n;i++)
{
ans.push_back(i);
}
if(w==256)
{
string a[3];
a[0]="11110000";
a[1]="11001100";
a[2]="10101010";
for(int i=0;i<3;i++)add_element(a[i]);
compile_set();
int ch=0;
for(int i=0;i<3;i++)
{
for(int j=0;j<8;j++)
{
for(int k=j+1;k<8;k++)
{
if(a[i][j]==a[i][k])continue;
swap(a[i][j],a[i][k]);
C=check_element(a[i]);
if(C)
{
ch=1;
swap(ans[j],ans[k]);
}
swap(a[i][j],a[i][k]);
}
if(ch)break;
}
if(ch)break;
}
}
else if(w==320)
{
}
else if(w==1024)
{
}
else if(w==1792)
{
}
else // w==896
{
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |