제출 #429479

#제출 시각아이디문제언어결과실행 시간메모리
429479Pichon5Unscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
2 ms332 KiB
#include <bits/stdc++.h> #define pb push_back #define vi vector<int> #include "messy.h" using namespace std; vector<int> restore_permutation(int n, int w, int r) { //add_element("0"); //compile_set(); //check_element("0"); for(int i=1;i<=n;i++){ string S(n,'0'); for(int l=0;l<i;l++)S[l]='1'; add_element(S); } compile_set(); string s(n,'0'); vi res(n); for(int i=0;i<n;i++){ for(int l=0;l<n;l++){ if(s[l]=='1')continue; s[l]='1'; if(check_element(s)){ res[l]=i; break; }else{ s[l]='0'; } } } return res; } /* 8 256 256 1 3 2 0 7 5 6 4 8 256 256 0 1 4 3 2 5 6 7 */
#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...