Submission #590885

#TimeUsernameProblemLanguageResultExecution timeMemory
590885Sam_a17Unscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
1 ms340 KiB
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <cstdio> #include "messy.h" using namespace std; #define ll long long #define ld long double #define all(x) (x.begin(), x.end()) #define rall(x) (x.rbegin(), x.rend()) #define sz(x) (int)x.size() vector<int> restore_permutation(int n, int w, int r) { string s(n, '0'); for(int i = 0; i < n; i++) { s[i] = '1'; // cout << s << endl; add_element(s); } compile_set(); string si(n, '0'); vector<int> answ(n, -1), used(n, -1); for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { if(answ[j] != -1) continue; si[j] = '1'; if(check_element(si)) { answ[j] = i; used[i] = true; break; } si[j] = '0'; } } return answ; }
#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...