Submission #756207

#TimeUsernameProblemLanguageResultExecution timeMemory
756207alexander707070Unscrambling a Messy Bug (IOI16_messy)C++14
0 / 100
1 ms212 KiB
#include<bits/stdc++.h> #include "messy.h" #define MAXN 10007 using namespace std; int n; string curr,zero; int p[MAXN]; bool used[MAXN]; vector<int> ans; vector<int> restore_permutation(int N, int w, int r){ n=N; for(int i=1;i<=n;i++)zero.push_back('0'); for(int i=0;i<n;i++){ curr=zero; for(int f=0;f<=i;f++)curr.push_back('1'); add_element(curr); } compile_set(); for(int i=0;i<n;i++){ curr=zero; for(int f=0;f<i;f++){ curr[p[f]]='1'; } for(int f=0;f<n;f++){ if(!used[p[f]]){ curr[f]='1'; if(check_element(curr)){ p[i]=f; used[f]=true; break; } curr[f]='0'; } } } for(int i=0;i<n;i++){ ans.push_back(p[i]); } return ans; } /* int main(){ } */
#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...