제출 #1121590

#제출 시각아이디문제언어결과실행 시간메모리
1121590Captain_GeorgiaUnscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
1 ms592 KiB
#include <bits/stdc++.h> #include "messy.h" using namespace std; std::vector<int> restore_permutation(int N, int w, int r) { string S(N, '0'), res(N, '0'); for (int i = 0;i < N;i ++) { S[i] = '1'; add_element (S); } compile_set (); vector<int> p(N, 0), used(N, 0); function<void(int)> func = [&](int ind) -> void { if (ind == N) return; for (int i = 0;i < N;i ++) if (used[i] == 0) { res[i] = '1'; if (check_element (res) == 1) { used[i] = 1; p[i] = ind; break; } res[i] = '0'; } func (ind + 1); }; func (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...