Submission #850997

#TimeUsernameProblemLanguageResultExecution timeMemory
85099712345678Unscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
1 ms756 KiB
#include "messy.h" #include <bits/stdc++.h> using namespace std; const int nx=35; bool vs[nx]; vector<int> restore_permutation(int n, int w, int r) { vector<int> ans(n); string s; for (int i=0; i<n; i++) s+='0', ans[i]=i; for (int i=0; i<n; i++) s[i]='1', add_element(s); for (int i=0; i<n; i++) s[i]='0'; compile_set(); for (int i=0; i<n; i++) { for (int j=0; j<n; j++) { if (vs[j]) continue; s[j]='1'; //cout<<i<<' '<<j<<' '<<s<<'\n'; if (check_element(s)) { vs[j]=1; ans[j]=i; //cout<<i<<' '<<j<<'\n'; break; } else s[j]='0'; } } 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...