Submission #829902

#TimeUsernameProblemLanguageResultExecution timeMemory
829902LiudasUnscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
1 ms340 KiB
#include <vector> #include <cstdio> #include <string> #include <set> #include <cstdlib> #include <iostream> #include "messy.h" using namespace std; vector<int> restore_permutation(int N, int W, int R){ string s = string(N, '0'); for(int i = 0; i < N; i ++){ s[i] = '1'; add_element(s); } compile_set(); string ans = string(N, '0'); vector<int> perm(N); for(int i = 0; i < N; i ++){ for(int j = 0; j < N; j ++){ string temp = ans; if(ans[j] == '0'){ temp[j] = '1'; bool good = check_element(temp); if(good){ ans[j] = '1'; perm[j] = i; break; } } } } return perm; }
#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...