제출 #69163

#제출 시각아이디문제언어결과실행 시간메모리
69163SmsSUnscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
3 ms384 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(time(NULL)); 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...