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>
using namespace std;
#define ll long long
#define ar array
#define ve vector
#define sz(a) ((int)(a).size())
void add_element(std::string x);
bool check_element(std::string x);
void compile_set();
ve<int> restore_permutation(int n, int w, int r) {
ve<int> p(n);
string x = "";
for(int i = 0; i < n; i++) {
x += '0';
}
for(int i = 0; i < n; i++) {
x[i] = '1';
add_element(x);
}
compile_set();
x = "";
for(int i = 0; i < n; i++) {
x += '0';
}
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++) {
if(x[j] != '1') {
x[j] = '1';
if(check_element(x)) {
p[i] = j;
break;
}
x[j] = '0';
}
}
}
return p;
}
# | 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... |