제출 #624259

#제출 시각아이디문제언어결과실행 시간메모리
624259moyindavidUnscrambling a Messy Bug (IOI16_messy)C++17
20 / 100
1 ms212 KiB
#include <bits/stdc++.h> #include "messy.h" #define pb push_back #define ll long long using namespace std; vector<int> restore_permutation(int n, int w, int r) { vector<string> v = {"01111111","00111111","00011111","00001111","00000111","00000011","00000001"}; for(auto u: v)add_element(u); compile_set(); vector<int> ans = {0,1,2,3,4,5,6,7}; for(int i=0;i<n-1;i++){ if(check_element(v[i]))continue; for(int j=i;j<n-1;j++){ swap(v[i][j],v[i][j+1]); if(!check_element(v[i]))continue; swap(ans[i],ans[j+1]); return ans; } } 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...