이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "messy.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> restore_permutation(int n, int w, int r) {
string adder = "";
for (int i = 0; i < n; i++) adder += '1';
for (int i = 0; i < n-1; i++){
adder[i] = '0';
//cout << "adding " << adder << endl;
add_element(adder);
}
compile_set();
string checker = "";
vector<int> ans; ans.assign(n,-1);
for (int i = 0; i < n; i++) checker += '1';
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++){
if (ans[j] == -1){
if (i == n-1){
ans[j] = i;
}
checker[j] = '0';
int result = check_element(checker);
//cout << "checking " << checker << endl;
if (result){
//cout << checker << " is in the set, ans[" <<j << "] = " << i << endl;
ans[j] = i;
break;
}
else{
checker[j] = '1';
}
}
}
}
return ans;
}
| # | 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... |