Submission #429478

#TimeUsernameProblemLanguageResultExecution timeMemory
429478Pichon5Unscrambling a Messy Bug (IOI16_messy)C++17
20 / 100
1 ms332 KiB
#include <bits/stdc++.h> #define pb push_back #define vi vector<int> #include "messy.h" using namespace std; vector<int> restore_permutation(int n, int w, int r) { //add_element("0"); //compile_set(); //check_element("0"); for(int i=1;i<=n;i++){ string s(n,'0'); for(int l=0;l<i;l++)s[l]='1'; add_element(s); } compile_set(); string s(n,'0'); vi res; for(int i=0;i<n;i++){ for(int l=0;l<n;l++){ if(s[l]=='1')continue; s[l]='1'; if(check_element(s)){ res.pb(l); break; }else{ s[l]='0'; } } } return res; } /* 8 256 256 0 1 2 3 4 5 7 6 8 256 256 0 1 4 3 2 5 6 7 */
#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...