# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
624259 | moyindavid | Unscrambling a Messy Bug (IOI16_messy) | C++17 | 1 ms | 212 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"
#define pb push_back
#define ll long long
using namespace std;
vector<int> restore_permutation(int n, int w, int r) {
vector<string> v = {"01111111","00111111","00011111","00001111","00000111","00000011","00000001"};
for(auto u: v)add_element(u);
compile_set();
vector<int> ans = {0,1,2,3,4,5,6,7};
for(int i=0;i<n-1;i++){
if(check_element(v[i]))continue;
for(int j=i;j<n-1;j++){
swap(v[i][j],v[i][j+1]);
if(!check_element(v[i]))continue;
swap(ans[i],ans[j+1]);
return ans;
}
}
return ans;
}
# | 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... |