제출 #790744

#제출 시각아이디문제언어결과실행 시간메모리
790744khshgUnscrambling a Messy Bug (IOI16_messy)C++14
0 / 100
1 ms340 KiB
#include"messy.h" #include<bits/stdc++.h> using namespace std; vector<int> restore_permutation(int N, int W, int R) { string S(N, '0'); for(int i = 0; i + 1 < N; ++i) { S[i] = '1'; add_element(S); } compile_set(); vector<int> ans(N, -1); for(int i = 0; i < N; ++i) { S = string(N, '0'); for(int j = 0; j < i; ++j) S[ans[j]] = 1; for(int j = 0; j < N; ++j) { if(S[j] == '1') continue; S[j] = '1'; if(!check_element(S)) { S[j] = '0'; continue; } ans[i] = j; break; } } return ans; }
#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...