# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1121699 | Elwino008 | Unscrambling a Messy Bug (IOI16_messy) | C++14 | 3 ms | 512 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 <vector>
#include <bits/stdc++.h>
using namespace std;
#include "messy.h"
mt19937 engine(time(NULL));
std::vector<int> restore_permutation(int n, int w, int r){
string s="";
for(int i=0; i<n; i++){
s=s+'1';
string q="";
for(int j=0; j<n-i-1; j++){
q=q+'0';
}
q=q+s;
add_element(q);
}
char a[200];
for(int i=0; i<n; i++){
a[i]='0';
}
map<int, int>ans;
uniform_int_distribution<>gen(0, n-2);
compile_set();
for(int t=n-1; t>0; t--){
int qwe=gen(engine);
while(true){
while(a[qwe]=='1'){
# | 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... |