Submission #1074335

#TimeUsernameProblemLanguageResultExecution timeMemory
1074335thinknoexitUnscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
1 ms600 KiB
#include "messy.h" #include<bits/stdc++.h> using namespace std; using ll = long long; int n; vector<int> restore_permutation(int _N, int w, int r) { n = _N; string s = string(n, '1'); for (int i = 0;i < n;i++) { s[i] = '0'; add_element(s); } compile_set(); vector<int> ans(n); string now = string(n, '1'); for (int i = 0;i < n;i++) { int idx = 0; for (int j = 0;j < n;j++) { if (now[j] == '0') continue; string q = now; q[j] = '0'; if (check_element(q)) { idx = j; break; } } // p[idx] = i now[idx] = '0'; ans[idx] = i; } 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...