제출 #960014

#제출 시각아이디문제언어결과실행 시간메모리
960014LucaLucaMUnscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
1 ms600 KiB
#include <vector> #include "messy.h" bool exista(std::string s) { return check_element(s); } std::vector<int> restore_permutation(int n, int w, int r) { std::string s(n, '0'); for (int i = 0; i < n; i++) { s[i] = '1'; add_element(s); } compile_set(); bool ocupat[n] = {}; std::vector<int> p(n); s = std::string(n, '0'); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (!ocupat[j]) { s[j] = '1'; if (exista(s)) { p[j] = i; ocupat[j] = true; break; } s[j] = '0'; } } } return p; } /** 4 16 16 2 1 3 0 **/
#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...