Submission #916722

#TimeUsernameProblemLanguageResultExecution timeMemory
916722aykhnUnscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
1 ms600 KiB
#include <bits/stdc++.h> #include "messy.h" using namespace std; vector<int> restore_permutation(int n, int w, int r) { for (int i = 1; i <= n; i++) { string str(n, '0'); for (int j = i; j < n; j++) str[j] = '1'; add_element(str); } compile_set(); vector<int> res(n, -1); for (int c = 0; c < n; c++) { string str(n, '1'); for (int i = 0; i < n; i++) if (res[i] != -1) str[i] = '0'; for (int i = 0; i < n; i++) { if (res[i] != -1) continue; str[i] = '0'; if (check_element(str)) { res[i] = c; break; } str[i] = '1'; } } return res; }
#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...