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 "messy.h"
using namespace std;
vector<int>restore_permutation(int n,int w,int r){
string now;
for(int i=0;i<n;i++){
now+="0";
}
for(int i=n-1;i>=0;i--){
now[i]='1';
add_element(now);
}
compile_set();
for(int i=0;i<n;i++) now[i]='0';
vector<int>ans(n);
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(now[j]=='0'){
now[j]='1';
bool b=check_element(now);
if(!b) now[j]='0';
else{
ans[j]=n-i-1;
break;
}
}
}
}
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... |