# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
116378 | valentin_imbach | Unscrambling a Messy Bug (IOI16_messy) | C++14 | 4 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 <vector>
#include "messy.h"
#include <iostream>
using namespace std;
string fill(string s, int n) {
while (s.size() < n) {
s += '0';
}
return s;
}
vector<int> restore_permutation(int n, int w, int r) {
string s = fill("",n);
vector<int> p = vector<int>(n);
string b = s;
for (int i = 0; i < n; i++) {
b[i] = '1';
//cout << b << endl;
add_element(b);
}
compile_set();
for (int k = 0; k < n; k++) {
string b = s;
for (int i = 0; i < n; i++) {
if (b[i] == '1') {
continue;
}
b[i] = '1';
//cout << b << endl;
if (check_element(b)) {
p[i] = k;
s[i] = '1';
break;
}
b[i] = '0';
}
}
return p;
}
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... |