제출 #739621

#제출 시각아이디문제언어결과실행 시간메모리
739621Abrar_Al_SamitUnscrambling a Messy Bug (IOI16_messy)C++17
18 / 100
1 ms340 KiB
#include <bits/stdc++.h> #include "messy.h" using namespace std; const int nax = 32; vector<int> restore_permutation(int n, int w, int r) { string mask = string(nax, '0'); for(int i=0; i<nax; ++i) { mask[i] = '1'; add_element(mask); } compile_set(); vector<int>p(n); set<int>already; for(int i=0; i<nax; ++i) { mask = string(nax, '0'); for(int x : already) { mask[x] = '1'; } int new_pos = -1; for(int j=0; j<nax; ++j) if(mask[j]=='0') { mask[j] = '1'; if(check_element(mask)) { new_pos = j; break; } mask[j] = '0'; } p[new_pos] = i; already.insert(new_pos); } 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...