# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1243873 | Amaarsaa | Unscrambling a Messy Bug (IOI16_messy) | C++20 | 1 ms | 328 KiB |
#include<bits/stdc++.h>
#include "messy.h"
using namespace std;
using ll = long long;
vector<int> restore_permutation(int n, int w, int r) {
ll i, j;
string str = string(n, '0');
for (i = 0;i < n; i ++) {
str[i] = '1';
add_element(str);
}
compile_set();
str = string(n, '0');
vector < int > ans(n );
for (i =0; i < n; i ++) {
for (j = 0; j < n; j ++) {
if ( str[j] == '1') continue;
str[j] = '1';
if ( check_element(str)) {
ans[j] = i;
break;
}
str[j]= '0';
}
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |