이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//
// main.cpp
// 2016_messy
//
// Created by Ema Skottova on 12.06.19.
// Copyright © 2019 Ema Skottova. All rights reserved.
//
#include <vector>
#include "messy.h"
using namespace std;
std::vector<int> restore_permutation(int n, int w, int r) {
string s(n, '0');
add_element(s);
for(int i = 0; i < n; i ++){
s[i + 1] = '1';
add_element(s);
}
compile_set();
int n2 = 1;
for(int i = 0; i < n; i ++){
n2 *= 2;
}
vector<int> a(n, 0);
for(int i = 0; i < n2; i ++){
int y = i;
string x;
for(int j = 0; j < n; j ++){
x += y % 2;
y /= 2;
}
if(check_element(x)){
y = i;
for(int j = 0; j < n; j ++){
a[n] += y % 2;
y /= 2;
}
}
}
return a;
}
# | 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... |