# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
796314 | Shithila | Unscrambling a Messy Bug (IOI16_messy) | C++14 | 1 ms | 340 KiB |
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 <bits/stdc++.h>
#include "messy.h"
using namespace std;
std::vector<int> restore_permutation(int n, int w, int r) {
string x;
string y;
vector<int> ans;
for(int i=0;i<n;i++)
{
x=x+'0';
}
y=x;
for(int i=0;i<n;i++)
{
x[i]='1';
add_element(x);
}
compile_set();
while(ans.size()!=n)
{
for(int i=0;i<n;i++)
{
bool valid=true;
for(int j=0;j<ans.size();j++)
{
if(i==ans[j])
{
valid=false;
break;
}
}
if(valid==false) continue;
y[i]='1';
bool produced=check_element(y);
if(produced==true)
{
ans.push_back(i);
break;
}
else y[i]='0';
}
}
return ans;
}
Compilation message (stderr)
# | 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... |