This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "messy.h"
#include <vector>
#include <string>
using namespace std;
std::vector<int> restore_permutation(int n, int w, int r) {
vector<string> original;
for (int x = 0; x<n; x++){
string s = "";
for(int y = 0; y<n; y++){
if (y<=x){
s+="1";
}
else s+="0";
}
add_element(s);
original.push_back(s);
}
compile_set();
bool thing = true;
int a,b;
for (int x = 0; x<n; x++){
if (thing&&!check_element(original[x])){
a = x;
thing=false;
}
if ((!thing)&&check_element(original[x])){
b = x;
thing = true;
}
}
vector<int> v;
for (int x = 0; x<n; x++){
if (x==a) v.push_back(b);
else if (x==b) v.push_back(a);
else v.push_back(x);
}
return v;
}
# | 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... |