제출 #1074052

#제출 시각아이디문제언어결과실행 시간메모리
1074052Hugo1729Unscrambling a Messy Bug (IOI16_messy)C++11
38 / 100
2 ms432 KiB
#include <bits/stdc++.h> using namespace std; #include "messy.h" string make_string(vector<int> bits){ string s; int n=bits.size(); for(int i=0;i<n;i++){ if(bits[i])s+="1"; else s+="0"; } return s; } vector<int> restore_permutation(int n, int w, int r) { vector<int> p(n); set<int> used; vector<int> strings(n,0); for(int i=0;i<n;i++){ strings[i]=1; add_element(make_string(strings)); } compile_set(); vector<int> query(n,0); for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(used.count(j))continue; query[j]=1; if(check_element(make_string(query))){ used.insert(j); p[j]=i; break; } query[j]=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...