제출 #756241

#제출 시각아이디문제언어결과실행 시간메모리
756241alexander707070Unscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
1 ms340 KiB
#include<bits/stdc++.h> #include "messy.h" #define MAXN 10007 using namespace std; int n; string curr,zero; int p[MAXN]; bool used[MAXN]; vector<int> ans; vector<int> restore_permutation(int N, int w, int r){ n=N; for(int i=1;i<=n;i++)zero.push_back('0'); curr=zero; for(int i=0;i<n;i++){ curr[i]='1'; add_element(curr); } compile_set(); for(int i=0;i<n;i++){ curr=zero; for(int f=0;f<n;f++){ if(used[f])curr[f]='1'; } for(int f=0;f<n;f++){ if(curr[f]=='0'){ curr[f]='1'; if(check_element(curr)){ p[f]=i; used[f]=true; break; } curr[f]='0'; } } } for(int i=0;i<n;i++){ ans.push_back(p[i]); } return ans; } /* int main(){ } */
#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...