This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//
// 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... |