This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <cstdio>
#include "messy.h"
using namespace std;
#define ll long long
#define ld long double
#define all(x) (x.begin(), x.end())
#define rall(x) (x.rbegin(), x.rend())
#define sz(x) (int)x.size()
vector<int> restore_permutation(int n, int w, int r) {
string s(n, '0');
for(int i = 0; i < n; i++) {
s[i] = '1';
add_element(s);
}
compile_set();
string si(n, '0');
vector<int> answ(n, -1), used(n, -1);
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++) {
if(used[j] != -1) continue;
si[j] = '1';
if(check_element(si)) {
answ[i] = j;
used[j] = true;
break;
}
si[i] = '0';
}
}
return answ;
}
# | 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... |