| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1325654 | eri16 | Unscrambling a Messy Bug (IOI16_messy) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
#include "messy.h"
using namespace std;
vector<int> restore_permutation(int n, int w, int r){
string s;
bool mull;
for (int i=0; i<n; i++){s.push_back('0');}
for(int i=0; i<n; i++){
s[i]='1';
add_element(s);
}
compile_set();
vector <int> ans(n);
for(int i=0; i<n; i++){
s[i]='0';
}
for (int i=0; i<n; i++){
for (int j=0; j<n; j++){
if (s[j]=='0'){
s[j]='1';
mull=check_element(s);
if (mull){
ungepruft[j]=0;
ans[j]=i;
break;
}
else{
s[j]='0';
}
}
}
}
return ans;
}