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;
bool visited[128];
vector<int> restore_permutation(int n, int w, int r) {
string bruh(n, '0');
for (int i=0;i<n;i++) {
bruh[i] = '1';
add_element(bruh);
}
compile_set();
for (int i=0;i<n;i++) {
bruh[i] = '0';
visited[i] = false;
}
vector<int> ansvec(n);
for (int i=0;i<n;i++) {
for (int j=0;j<n;j++) {
if (visited[j]) {continue;}
bruh[j] = '1';
if (check_element(bruh)) {
ansvec[j] = i;
visited[j] = true;
break;
} else {
bruh[j] = '0';
}
}
}
return ansvec;
}
# | 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... |