Submission #116405

#TimeUsernameProblemLanguageResultExecution timeMemory
116405AdOjis485Unscrambling a Messy Bug (IOI16_messy)C++14
0 / 100
3 ms384 KiB
// // main.cpp // 2016_messy // // Created by Ema Skottova on 12.06.19. // Copyright © 2019 Ema Skottova. All rights reserved. // #include <vector> #include "messy.h" using namespace std; std::vector<int> restore_permutation(int n, int w, int r) { string s(n, '0'); add_element(s); for(int i = 0; i < n; i ++){ s[i + 1] = '1'; add_element(s); } compile_set(); int n2 = 1; for(int i = 0; i < n; i ++){ n2 *= 2; } vector<int> a(n, 0); for(int i = 0; i < n2; i ++){ int y = i; string x; for(int j = 0; j < n; j ++){ x += y % 2; y /= 2; } if(check_element(x)){ y = i; for(int j = 0; j < n; j ++){ a[n] += y % 2; y /= 2; } } } return a; }
#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...