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 pb push_back
const int MAX=1e5;
vector<int> restore_permutation(int n, int w, int r)
{
/*add_element("0");
compile_set();
check_element("0");*/
string X="";
vector<int> res;
for(int A=0;A<n;A++)
res.pb(A);
for(int A=0;A<n;A++)
X+="0";
for(int A=0;A<n;A++)
{
X[A]='1';
add_element(X);
}
compile_set();
for(int A=0;A<n;A++)
X[A]='0';
for(int A=0;A<n;A++)
{
for(int B=0;B<n;B++)
{
if(X[B]=='1')
continue;
X[B]='1';
if(check_element(X))
{
res[B]=A;
break;
}
X[B]='0';
}
}
return res;
}
# | 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... |