제출 #1021915

#제출 시각아이디문제언어결과실행 시간메모리
1021915vjudge1Unscrambling a Messy Bug (IOI16_messy)C++17
38 / 100
1 ms348 KiB
#include "messy.h" #include <bits/stdc++.h> using namespace std; #define rall(s) s.rbegin(), s.rend() #define all(s) s.begin(), s.end() #define sz(s) (int)s.size() #define s second #define f first using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; const int N = 2e5 + 5; vector<int> restore_permutation(int n, int w, int r) { string h = ""; for (int i = 0; i < n; i++) h += '0'; for (int i = 0; i < n - 1; i++) { h[i] = '1'; add_element(h); } compile_set(); for (int i = 0; i < n; i++) h[i] = '0'; vector<int> p(n); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (h[j] == '1') continue; h[j] = '1'; if (i == n - 1 || check_element(h)) { p[j] = i; break; } h[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...