Submission #916714

#TimeUsernameProblemLanguageResultExecution timeMemory
916714aykhnUnscrambling a Messy Bug (IOI16_messy)C++17
20 / 100
1 ms612 KiB
#include <bits/stdc++.h>
#include "messy.h"

using namespace std;

vector<int> restore_permutation(int n, int w, int r) 
{
    assert(n == 8);
    for (int i = 1; i < 8; i++)
    {
        string str(n, '0');
        for (int j = i; j < 8; j++) str[j] = '1';
        add_element(str);
    }
    compile_set();
    vector<int> res(n, 0);
    for (int i = 0; i < (1 << 8); i++)
    {
        string str(n, '0');
        for (int j = 0; j < 8; j++) str[j] += (i >> j & 1);
        if (check_element(str))
        {
            for (int j = 0; j < 8; j++) res[j] += (i >> j & 1);
        }
    }
    return res;
}
#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...