# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
95724 | jeff | Unscrambling a Messy Bug (IOI16_messy) | C++14 | 3 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "messy.h"
using namespace std;
set<string> a, b;
vector<int> restore_permutation(int n, int w, int r) {
if (n == 8 || r == 1024) {
vector<int> v;
int i, j;
string s = "", t;
for (i = 0; i < n; ++i) v.push_back(-1), s += "0";
for (i = 0; i < n; ++i) {
s[i] = '1';
add_element(s);
}
compile_set();
s = "";
for (i = 0; i < n; ++i) s += "0";
for (i = 0; i < n; ++i) {
for (j = 0; j < n; ++j) if (s[j] == '0') {
t = s;
t[j] = '1';
if (check_element(t)) {
v[j] = i;
s = t;
break;
}
}
}
return v;
}
}
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... |