Submission #69168

#TimeUsernameProblemLanguageResultExecution timeMemory
69168SmsSUnscrambling a Messy Bug (IOI16_messy)C++14
49 / 100
3 ms512 KiB
#include<bits/stdc++.h> using namespace std; #define for2(a,b,c) for(int a=b;a<c;a++) #include "messy.h" vector<int> restore_permutation(int n, int w, int r) { string s; for2(i,0,n) s += "0"; for2(i,0,n){ s[i] = '1'; add_element(s); } compile_set(); vector<int> p(n); vector<int> rnd(n); for2(i,0,n) rnd[i] = i; srand(10); for2(i,0,n) s[i] = '0'; for2(i,0,n){ random_shuffle(rnd.begin(),rnd.end()); for(auto x : rnd) if(s[x] != '1'){ s[x] = '1'; if(check_element(s)){ p[x] = i; break; } s[x] = '0'; } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...