Submission #850995

#TimeUsernameProblemLanguageResultExecution timeMemory
85099512345678Unscrambling a Messy Bug (IOI16_messy)C++17
0 / 100
1 ms604 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-1; 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-1; i++) { for (int j=0; j<n; j++) { if (vs[j]) continue; s[j]='1'; if (check_element(s)) { vs[j]=1; ans[j]=i; 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...