# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1244856 | SpyrosAliv | Unscrambling a Messy Bug (IOI16_messy) | C++20 | 1 ms | 328 KiB |
#include <bits/stdc++.h>
#include "messy.h"
using namespace std;
std::vector<int> restore_permutation(int n, int w, int r) {
string s;
for (int i = 0; i < n; i++) {
s += '0';
}
for (int i = 0; i < n; i++) {
s[i] = '1';
add_element(s);
}
compile_set();
string curr = "";
for (int i = 0; i < n; i++) curr += '0';
vector<int> ans(n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (curr[j] == '1') continue;
curr[j] = '1';
if (check_element(curr)) {
ans[i] = j;
break;
}
curr[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... |