이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |