Submission #1004926

#TimeUsernameProblemLanguageResultExecution timeMemory
1004926Mr_HusanboyUnscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
1 ms604 KiB
#include <vector> #include<bits/stdc++.h> using namespace std; #include "messy.h" vector<int> restore_permutation(int n, int w, int r) { for(int i = 0; i < n; i ++){ string s(n, '1'); for(int j = 0; j <= i; j ++) s[j] = '0'; add_element(s); } compile_set(); vector<int> p(n, -1); for(int j = 0; j < n; j ++){ string s(n, '1'); vector<int> done(n); for(int i = 0; i < n; i ++){ if(~p[i]) s[i] = '0', done[i] = 1; } for(int i = 0; i < n; i ++){ if(done[i]) continue; s[i] = '0'; if(check_element(s)){ //cout << i << ' ' << j << endl; p[i] = j; break; } s[i] = '1'; } } return p; };
#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...