이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "messy.h"
#define startt ios_base::sync_with_stdio(false);cin.tie(0);
typedef long long  ll;
using namespace std;
#define vint vector<int>
 
vector<int> restore_permutation(int n, int w, int r)
{
    string now;
    for(int i = 0; i < n; i++)
    {
        now.push_back('0');
    }
    for(int i = 0; i < n; i++)
    {
        now[i]++;
        add_element(now);
    }
    compile_set();
    vector<string> bits;
    vint ans(n);
    string already;
    for(int i = 0; i < n; i++)
    {
        already.push_back('0');
    }
    for(int i = 0; i < n; i++)
    {
        for(int j = 0; j < n; j++)
        {
            if(already[j] == '0')
            {
                string x = already;
                x[j]++;
                if(check_element(x))
                {
                    ans[i] = j;
                    already = x;
                    break;
                }
            }
        }
    }
    return ans;
}
/*
int32_t main(){
    startt
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
}
 
 
*/
| # | 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... |