제출 #609749

#제출 시각아이디문제언어결과실행 시간메모리
609749APROHACKUnscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
1 ms340 KiB
#include <vector> #include <bits/stdc++.h> using namespace std; #include "messy.h" std::vector<int> restore_permutation(int n, int w, int r) { string s= "", k = ""; vector<int>permutation; for(int i = 0 ; i < n ; i ++)s+="0", permutation.push_back(0); k=s; for(int i = 0 ; i < n ; i++){ s[i]='1'; add_element(s); } compile_set(); bool past[n]; memset(past, false, sizeof past); for(int i = 0 ; i < n ; i++){ for(int j = 0 ; j < n ; j ++){ if(!past[j]){ k[j]='1'; if(check_element(k)){ past[j]=true; permutation[j]=i; break; }else k[j]='0'; } } } return permutation; }
#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...