이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "messy.h"
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define inside sl<=l&&r<=sr
#define outside r<sl||sr<l
#define orta ((l+r)>>1)
#define INF 1000000009
#define mod 1000000007
#define ppair(x); cerr << "(" << x.first << ", " << x.second << ")\n";
#define bas(x) #x << ": " << x << " "
#define prarr(x, n); cerr << #x << ": "; for(int qsd = 0; qsd < n; qsd++) cerr << x[qsd] << " "; cerr << "\n";
#define prarrv(x); cerr << #x << ": "; for(int qsd = 0; qsd < (int)x.size(); qsd++) cerr << x[qsd] << " "; cerr << "\n";
using namespace std;
typedef long long ll;
int n, w, r;
vector<int> restore_permutation(int N, int W, int R) {
n = N;
w = W;
r = R;
string add = "";
for (int i = 0; i < n; i++) add += "0";
for (int i = 0; i < n; i++){
add[i] = '1';
add_element(add);
}
compile_set();
vector<int> perm(n);
string res = "";
for (int i = 0; i < n; i++) res += "0";
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++){
if (res[j] == '1') continue;
string sor = res;
sor[j] = '1';
if (check_element(sor)){
perm[j] = i;
res[j] = '1';
break;
}
}
}
return perm;
/*add_element("0000");
compile_set();
check_element("0000");
return vector<int>{0, 1, 2, 3};*/
}
# | 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... |