Submission #379745

#TimeUsernameProblemLanguageResultExecution timeMemory
379745ponytailUnscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
1 ms384 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...