Submission #916714

# Submission time Handle Problem Language Result Execution time Memory
916714 2024-01-26T10:53:15 Z aykhn Unscrambling a Messy Bug (IOI16_messy) C++17
20 / 100
1 ms 612 KB
#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 time Memory Grader output
1 Correct 0 ms 348 KB n = 8
2 Correct 1 ms 348 KB n = 8
3 Correct 1 ms 348 KB n = 8
4 Correct 1 ms 348 KB n = 8
5 Correct 0 ms 348 KB n = 8
6 Correct 1 ms 348 KB n = 8
7 Correct 1 ms 348 KB n = 8
8 Correct 1 ms 348 KB n = 8
9 Correct 1 ms 348 KB n = 8
10 Correct 1 ms 348 KB n = 8
11 Correct 1 ms 348 KB n = 8
12 Correct 0 ms 348 KB n = 8
13 Correct 1 ms 344 KB n = 8
14 Correct 1 ms 600 KB n = 8
15 Correct 1 ms 348 KB n = 8
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 612 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -