QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#589274#2167. QC QCQingyuAC ✓39ms3880kbC++235.1kb2024-09-25 16:58:462024-09-25 16:58:47

Judging History

This is the latest submission verdict.

  • [2024-09-25 16:58:47]
  • Judged
  • Verdict: AC
  • Time: 39ms
  • Memory: 3880kb
  • [2024-09-25 16:58:46]
  • Submitted

answer

// Solution is valid, but doesn't always run within the query limit

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <random>
#include <cassert>

//#define SELF_TEST 1

using namespace std;

#define SZ(x) (int((x).size()))
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;

static int N;
static vi st;
static int nqueries = 0;
static vi permute;

static constexpr int MAX_QUERIES = 12;

#ifdef SELF_TEST
static vector<bool> working;
#endif

static vi query(const vpii &q)
{
    nqueries++;
    vi perm(N, -1);
#ifdef SELF_TEST
    set<int> seen[2];
#endif
    for (const auto &item : q)
    {
        perm[permute[item.first]] = permute[item.second];
#ifdef SELF_TEST
        assert(!seen[0].count(item.first));
        assert(!seen[1].count(item.second));
        seen[0].insert(item.first);
        seen[1].insert(item.second);
#endif
    }

    string line;
#ifdef SELF_TEST
    for (int i = 0; i < N; i++)
    {
        if (working[i])
            line += working[perm[i]] ? '1' : '0';
        else
            line += '1';
    }
#else
    cout << "test";
    for (int i = 0; i < N; i++)
        cout << ' ' << perm[i] + 1;
    cout << endl;
    cin >> line;
#endif
    vi ans;
    for (const auto &item : q)
        ans.push_back(line[permute[item.first]] == '1');
    return ans;
}

static void solve(const vi &cand)
{
    int M = cand.size();
    vpii q;
    vi ans;

    if (M <= 2)
    {
        for (int v : cand)
            st[v] = 1;
    }
    else if (M == 3)
    {
        q.emplace_back(cand[0], cand[1]);
        q.emplace_back(cand[1], cand[2]);
        q.emplace_back(cand[2], cand[0]);
        ans = query(q);
        st[cand[0]] = st[cand[1]] = st[cand[2]] = 1;
        for (int i = 0; i < 3; i++)
            if (ans[i] == 1 && ans[(i + 1) % 3] == 0)
                st[cand[(i + 2) % 3]] = 0;
    }
    else
    {
        for (int i = 0; i + 1 < M; i += 2)
        {
            q.emplace_back(cand[i], cand[i + 1]);
            q.emplace_back(cand[i + 1], cand[i]);
        }
        ans = query(q);
        vi sub, dup, other;
        for (int i = 0; i + 1 < M; i += 2)
        {
            if (ans[i] == 1 && ans[i + 1] == 1)
            {
                sub.push_back(cand[i]);
                dup.push_back(cand[i + 1]);
            }
            else
            {
                other.push_back(cand[i]);
                other.push_back(cand[i + 1]);
            }
        }
        if (M & 1)
        {
            if (SZ(sub) % 2 == 0)
                sub.push_back(cand.back());
            else
                other.push_back(cand.back());
        }
        solve(sub);
        for (int i = 0; i < SZ(dup); i++)
            st[dup[i]] = st[sub[i]];
        vi good;
        int known = 0;
        for (int i = 0; i < M; i++)
        {
            if (st[cand[i]] != -1)
                known++;
            if (st[cand[i]] == 1)
                good.push_back(cand[i]);
        }
        while (!other.empty())
        {
            if (2 * (SZ(good) + SZ(other) / 2) <= M)
            {
                st[other.back()] = 1;
                good.push_back(other.back());
                other.pop_back();
                known++;
            }
            else
            {
                q.clear();
                for (int v : good)
                {
                    if (other.empty())
                        break;
                    q.emplace_back(v, other.back());
                    other.pop_back();
                }
                ans = query(q);
                for (int i = 0; i < SZ(q); i++)
                {
                    known++;
                    st[q[i].second] = ans[i];
                    if (ans[i])
                        good.push_back(q[i].second);
                }
            }
        }
    }
}

int main()
{
    mt19937 engine(2645644534);
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    int T;
    cin >> T;
    for (int cas = 0; cas < T; cas++)
    {
        cin >> N;
        nqueries = 0;
#ifdef SELF_TEST
        string line;
        cin >> line;
        assert(SZ(line) == N);
        working.resize(N);
        for (int i = 0; i < N; i++)
            working[i] = (line[i] == '1');
        assert(count(working.begin(), working.end(), 1) * 2 > N);
#endif

        permute.clear();
        for (int i = 0; i < N; i++)
            permute.push_back(i);
        shuffle(permute.begin(), permute.end(), engine);
        st.clear();
        st.resize(N, -1);
        vi cand;
        for (int i = 0; i < N; i++)
            cand.push_back(i);
        solve(cand);

        string ans(N, '?');
        for (int i = 0; i < N; i++)
        {
            assert(st[i] != -1);
            ans[permute[i]] = char(st[i]) + '0';
        }
#ifdef SELF_TEST
        assert(ans == working);
        cout << nqueries << " queries\n";
        assert(nqueries <= MAX_QUERIES);
#else
        cout << "answer " << ans << endl;
#endif
    }
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3608kb

input:

1
5
00-10
--0--
0-1--

output:

test 2 1 0 5 4
test 0 0 2 0 0
test 4 0 5 0 0
answer 10101

result:

ok correct

Test #2:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

2
4
1111
7
101-001
---0---
---10--
---01--

output:

test 4 3 2 1
answer 1111
test 6 7 5 0 3 1 2
test 0 0 0 3 0 0 0
test 0 0 0 2 7 0 0
test 0 0 0 1 6 0 0
answer 0101110

result:

ok correct

Test #3:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

500
3
110
3
011
3
100
4
1011
1-0-
4
1101
10--
4
0011
--01
5
-0111
--00-
5
1-100
1-0--
0----
5
0110-
-10--
--0--
5
111-1
0--11
5
1-111
-110-
5
1-111
10--0
6
111001
-10---
-01---
6
011100
--01--
--01--
6
011000
-01---
-01---
6
110111
-0---1
6
110111
01----
6
100111
---10-
7
10010-1
-----1-
--1--0-
--0...

output:

test 2 3 1
answer 011
test 2 3 1
answer 101
test 2 3 1
answer 110
test 3 4 1 2
test 2 0 4 0
answer 1110
test 2 1 4 3
test 3 4 0 0
answer 1110
test 2 1 4 3
test 0 0 1 2
answer 0111
test 0 5 4 3 2
test 0 0 1 5 0
answer 01110
test 3 0 1 5 4
test 2 0 5 0 0
test 4 0 0 0 0
answer 11100
test 4 3 2 1 0
test...

result:

ok correct

Test #4:

score: 0
Accepted
time: 28ms
memory: 3616kb

input:

500
27
10010111111-110111111100111
1-----1-11--1----1-1-1--11-
------1-----1----1------1--
1-----1-----------------1--
------------------------1--
-------0----1-----1-----001
27
1-1111111111101111111111011
1------1111----1---1-111---
-------111-------------1---
1------11------------------
-------1--...

output:

test 21 15 23 20 24 7 6 13 17 14 22 0 8 10 2 18 9 16 26 4 1 11 3 5 27 19 25
test 10 0 0 0 0 0 9 0 7 1 0 0 20 0 0 0 0 22 0 13 0 18 0 0 26 25 0
test 0 0 0 0 0 0 18 0 0 0 0 0 25 0 0 0 0 7 0 0 0 0 0 0 13 0 0
test 25 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0
test 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

result:

ok correct

Test #5:

score: 0
Accepted
time: 1ms
memory: 3516kb

input:

1
1

output:

answer 1

result:

ok correct

Test #6:

score: 0
Accepted
time: 19ms
memory: 3616kb

input:

500
38
00010110111101111101111100111111111110
-----11---11-1-111---------1--------1-
-----1-----1-1----------------------1-
-----1-------1--1---------------------
-------------1------------------------
-----10--101-10--0--1-0----01---0-001-
38
11001010111101011001110111111111111101
-1--1-0-0-------0...

output:

test 27 24 38 16 31 35 29 34 13 18 36 23 9 33 37 4 22 10 26 32 28 17 12 2 30 19 1 21 7 25 5 20 14 8 6 11 15 3
test 0 0 0 0 0 7 6 0 0 0 37 28 0 18 0 17 16 14 0 0 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 11 0
test 0 0 0 0 0 37 0 0 0 0 0 14 0 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0
test 0 0 0 0 0 17...

result:

ok correct

Test #7:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

3
2
3
111
3
011

output:

answer 11
test 2 3 1
answer 111
test 2 3 1
answer 101

result:

ok correct

Test #8:

score: 0
Accepted
time: 18ms
memory: 3520kb

input:

500
46
1111101110111111101111111111110111011111111101
1---1-1---11-1-11-1----11--1-1---1--11--11----
1-----1---1--1-1-------1---------1-------1----
------1------1-1-------1----------------------
------1------1--------------------------1-----
-------------1--------------------------------
--1-0--0---...

output:

test 27 25 38 16 43 35 29 34 32 31 36 23 45 33 37 4 22 46 26 42 28 17 12 40 2 19 1 21 7 39 10 9 14 8 6 11 15 3 30 24 44 20 5 41 13 18
test 28 0 0 0 34 0 37 0 0 0 17 24 0 38 0 30 11 0 42 0 0 0 0 12 41 0 0 1 0 16 0 0 0 5 0 0 7 14 0 0 25 19 0 0 0 0
test 24 0 0 0 0 0 11 0 0 0 7 0 0 34 0 42 0 0 0 0 0 0 0...

result:

ok correct

Test #9:

score: 0
Accepted
time: 20ms
memory: 3636kb

input:

500
53
10100011111101111111011011011-10111110111101111101111
0-1---1--1-1-1----10----11-1----11-1---10--1--10---1-
--1---1--1---1----------11-------------1-----------1-
--1------1---1----------1----------------------------
---------1--------------1----1-----------------------
------0----------------...

output:

test 46 4 23 2 24 27 50 48 14 39 52 18 49 9 36 28 44 12 53 35 38 34 3 5 51 29 6 16 26 0 40 43 42 22 20 15 41 21 10 31 37 33 32 17 47 1 45 8 13 7 25 11 19
test 41 0 28 0 0 0 44 0 0 12 0 10 0 19 0 0 0 0 14 48 0 0 0 0 47 34 0 3 0 0 0 0 40 26 0 52 0 0 0 33 1 0 0 7 0 0 25 20 0 0 0 36 0
test 0 0 52 0 0 0 ...

result:

ok correct

Test #10:

score: 0
Accepted
time: 17ms
memory: 3620kb

input:

500
59
1110111111111111110011111111101111011-111011111111011110111
1-1---1--1-111---------1-111----11-1----1-11--11---1----1-1
1-1---1--1--1------------1-1----1--1----------1------------
--1---------1----------------------1----------1------------
1----------------------------------1----------1------...

output:

test 46 4 55 2 24 27 50 48 14 39 52 18 49 9 36 28 44 12 53 35 59 34 37 5 51 29 6 16 26 42 57 43 54 22 20 15 23 0 10 56 58 30 32 17 47 1 45 8 13 7 25 11 19 33 3 40 31 41 21
test 41 0 24 0 0 0 44 0 0 12 0 10 27 33 0 0 0 0 0 0 0 0 0 3 0 43 13 52 0 0 0 0 14 57 0 59 0 0 0 0 1 0 26 7 0 0 48 47 0 0 0 28 0 ...

result:

ok correct

Test #11:

score: 0
Accepted
time: 19ms
memory: 3636kb

input:

500
65
01101110001100111001010100111111-11111011001101101000011011111011
--1---1------------1---1--11-----1-1---11--1--1-------------11---
--1---1-------------------11------------1-----1------------------
--1-----------------------1-------------------1------------------
-----------------------------...

output:

test 46 4 55 2 24 27 60 48 14 39 31 18 49 9 36 28 44 12 53 35 59 34 37 5 51 29 6 16 26 42 11 43 0 22 20 15 23 62 10 56 58 30 32 17 47 1 45 8 13 61 25 64 19 65 3 40 63 41 21 7 50 38 57 52 54
test 0 0 24 0 0 0 44 0 0 0 0 0 0 0 0 0 0 0 0 47 0 0 0 3 0 0 40 36 0 0 0 0 0 41 0 28 0 0 0 27 34 0 0 7 0 0 20 0...

result:

ok correct

Test #12:

score: 0
Accepted
time: 10ms
memory: 3652kb

input:

500
70
1101111101111101001100111100111011110011111110010101111011001100011010
----1-1---00-0-1--10---00----11--0------011----1----0---0--------10-0-
----1-1--------1-------------------------1----------------------------
------1-----------------------1----------1----------------------------
----0-1--...

output:

test 50 25 38 41 45 69 52 34 21 57 35 23 67 33 37 54 22 60 58 62 9 17 12 40 2 31 68 56 66 39 26 65 14 8 11 48 15 3 30 24 4 55 61 53 5 47 46 36 59 1 63 7 44 16 42 28 10 19 49 18 43 20 51 70 32 29 13 27 6 64
test 0 0 0 0 66 0 48 0 0 0 69 24 0 34 0 30 0 0 42 41 0 0 0 12 53 0 0 0 0 16 43 0 0 14 0 0 0 0 ...

result:

ok correct

Test #13:

score: 0
Accepted
time: 33ms
memory: 3796kb

input:

500
75
0111010000101011000010111000100101001010101111100-1111010100000101111101010
---1------------------1-1---------------1-1---1----1---------------1-------
------------------------1-----------------1--------1---------------1-------
------------------------1------------------------1---------------...

output:

test 39 4 57 2 24 27 60 48 14 67 31 18 49 9 36 28 44 12 66 35 59 71 37 5 51 29 6 16 26 42 11 43 70 73 20 15 23 62 1 56 58 30 32 17 47 68 45 8 13 0 25 64 61 65 74 40 3 41 21 7 53 38 72 52 54 19 10 46 75 33 22 63 34 55 69
test 0 0 0 52 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 43 0 47 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok correct

Test #14:

score: 0
Accepted
time: 18ms
memory: 3648kb

input:

500
79
111010100111110010110111011110111111111001101111110111011011110011-111101110111
--1---1--1--1-----11-111-1----1-11----1---1--11--1----------1---1---1--------1-
--1---1--1---------------1----1--1----1-------1-----------------1---1----------
---------1---------------1--------------------1------...

output:

test 39 4 57 2 24 27 60 48 14 79 31 18 49 9 36 28 44 12 66 35 59 71 37 5 51 29 6 16 26 42 11 43 70 73 20 15 23 78 1 56 58 30 32 17 47 62 45 8 13 77 25 64 61 65 74 40 3 41 21 7 53 46 72 52 54 19 0 76 75 33 22 63 34 55 69 68 50 38 10
test 0 0 22 0 0 0 24 0 0 13 0 0 10 0 0 0 0 0 65 47 0 3 34 7 0 43 0 0...

result:

ok correct

Test #15:

score: 0
Accepted
time: 11ms
memory: 3680kb

input:

500
83
111101100011001111111100110111111111011011111-1001101110111111000111111011111100011
--1---1----1------11-1--10-1-11-11-1--0-1-01--1--1---1----1-0-----111----1---1---11
--1----------------1----1--1--1--1---------1-----1--------1--------11------------1-
--1---------------------1----------------...

output:

test 39 82 57 54 24 67 60 48 14 79 31 18 49 9 36 28 44 12 66 35 59 71 37 5 51 29 80 16 26 42 11 43 70 73 20 15 23 78 1 56 58 30 32 17 47 0 45 8 13 77 25 64 61 4 74 40 3 41 21 7 53 83 72 52 81 19 6 76 75 33 22 63 34 55 69 68 50 38 10 27 65 2 62
test 0 0 22 0 0 0 20 0 0 0 0 59 0 0 0 0 0 0 82 7 0 3 0 0...

result:

ok correct

Test #16:

score: 0
Accepted
time: 18ms
memory: 3876kb

input:

500
87
110011110001100011110110111101-10101111111111011111111011101111111101101111111111011111
------1----11-----1---1-111--1---1----111-11--11-1-1--------1---1---1--1-----1----1--1-
-----------1------------111------1----1----1---1----------------1---1--1-------------1-
------------------------1-1--...

output:

test 39 82 57 54 24 67 60 48 14 79 87 18 49 9 36 28 44 12 66 35 59 71 37 5 51 85 80 16 68 42 0 43 70 73 20 15 23 78 1 84 58 30 32 17 47 56 45 8 13 77 25 64 61 4 74 46 3 41 21 7 53 83 72 52 81 19 6 29 75 33 22 63 34 55 69 86 50 38 10 27 65 2 62 40 26 76 11
test 0 0 0 0 0 0 48 0 0 0 0 13 12 0 0 0 0 0 ...

result:

ok correct

Test #17:

score: 0
Accepted
time: 13ms
memory: 3584kb

input:

500
91
1111011001111001010111110111011111111111110100001010001111-11100110011110111101111110111111
--1---1--1-11------1-11---11-11-1-----111-----------------------1---1----1--------1--11-1-1
--1--------1-------1------1--1--1-----------------------------------1----1--------1--1--1-1
--1--------------...

output:

test 39 89 57 54 24 67 60 48 14 79 87 18 49 9 36 28 44 12 66 35 91 71 37 5 90 85 80 16 68 42 51 43 70 73 20 15 23 78 1 84 58 30 32 17 47 56 45 8 13 77 31 64 61 4 74 46 3 41 0 7 53 83 72 52 81 19 6 29 75 33 22 63 34 55 69 86 50 38 10 27 65 88 62 40 26 76 11 82 2 25 21
test 0 0 22 0 0 0 20 0 0 91 0 13...

result:

ok correct

Test #18:

score: 0
Accepted
time: 39ms
memory: 3576kb

input:

500
95
0001111100100011000100011101111111100101111011110111111101111001101111001111110011011110010-010
------0------------1---110-1000-11-----00-1--011---0-0----0-1---1-0-0----0---0---0---10------0-
-----------------------10-------0---------0----0----------------1------------------------------
-----...

output:

test 39 89 57 54 24 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 5 90 85 80 16 68 42 51 43 70 73 20 95 23 78 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 4 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 33 22 63 34 55 69 86 94 38 10 27 65 50 62 40 26 76 11 93 2 25 21 0 88 77 36
test 0 0 0 0 0 0 74 ...

result:

ok correct

Test #19:

score: 0
Accepted
time: 32ms
memory: 3620kb

input:

500
98
11111111111011011011011011101101001101100011111111111111110101111011101011111111111011111111110111
---11-----1-11-11-11----1------------11---1---01-1111-1-1----------1-----1-1-1--1---1-11-1---1--1-
---11--------1-1----------------------1---1----1--1-1-1-1------------------------------1-----1-...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 37 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 94 42 8 11 48 15 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 32 69 57 92 68
test 0 0 0...

result:

ok correct

Test #20:

score: 0
Accepted
time: 31ms
memory: 3612kb

input:

500
99
101-10001101110101000101111100101001011100000000111111001000110110001010001010111111100001010111001
--0------0-001-------0-11001--0----0--10-----------1-0------1---1---0------------01--------0-1-----
------------------------0--0----------0-------------------------0----------------------------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #21:

score: 0
Accepted
time: 28ms
memory: 3680kb

input:

500
100
1111110110100001101001011000100001111111100111010111110011000001110001101011001010011100011001010000
---10-----1----00-1----01--------0---01-1------0-1011---0------0-0------0--0----0---0----0---1------
--------------------------------------1-0--------1--0-------------------------------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #22:

score: 0
Accepted
time: 26ms
memory: 3880kb

input:

500
100
0111001100011011101000001010001110101011110000100101111110110110100011100010001000110010101111010011
-----------1---1--1-----1-------1-------1---------------1-----------------------------1-----------11
-----------1------------1-------------------------------1---------------------------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #23:

score: 0
Accepted
time: 24ms
memory: 3632kb

input:

500
99
111-01101111111011111000001101001110001101001011000000001101111000100001111000001010111010000011100
--1---1----1-1-----1---------1---1----1-------1-------------------1----1----------1---1-1----------
------1--------------------------1----1-------1------------------------1----------------1----...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #24:

score: 0
Accepted
time: 26ms
memory: 3576kb

input:

500
99
000-00101111001010110010001001100000000111000010011010111101110100111111101101011100011110100110001
------1-------------------1--11---------1-------------------1-------1------------1---11------------
------1----------------------1-------------------------------------------------------11------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #25:

score: 0
Accepted
time: 17ms
memory: 3836kb

input:

500
99
111-11100100111110110011001010100011001011011000010001010011001110100111101101000110111001110000010
------1------------1------------------1----1--------------1-------1----1---------1---1-----------1-
-------------------1------------------1----1---------------------------1---------------------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #26:

score: 0
Accepted
time: 17ms
memory: 3644kb

input:

500
99
011-01011001000001111111101001011010101111110001011001110000000000111000101011101110101111001000101
-----------1-------1--1-1----1------------1----1-----1------------1-1--------1---1------1---1------
-------------------1----1----1------------------------------------1-1-------------------1----...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #27:

score: 0
Accepted
time: 15ms
memory: 3800kb

input:

500
99
000-10001010011001110110110010111000010011111000110110100011111110000100010101101001011101011011011
-------------1----------1------------1----1--------1------1-1---1--------1-----------11----11----1-
-------------1----------1-----------------1--------1----------------------------------------1...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #28:

score: 0
Accepted
time: 29ms
memory: 3576kb

input:

500
99
111-01110010101000001011110101000000111000101101100110100001110111100110000011011010011001001011111
------1-----1---------111-------------1--------1---1--------1---1------------1----1---1----------1-
------1-----------------1--------------------------1------------1------------1---------------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #29:

score: 0
Accepted
time: 14ms
memory: 3580kb

input:

500
99
000-11001110011001110110000000100010110111011110110110011010010010010010010000011011111011111011101
-------------1-----1-11----------------1-----11-----------1-----1-----------------1---1----1-------
-------------1-------------------------1------1-----------1-----------------------1---1------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #30:

score: 0
Accepted
time: 28ms
memory: 3648kb

input:

500
99
101-00000111100000011101000111001101101100110111111110110110010111110000111110000101100011001000001
------------1---------------1----1----11-----1-----1---------------------1-------------------------
------------1--------------------1-----------1---------------------------1-------------------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #31:

score: 0
Accepted
time: 17ms
memory: 3872kb

input:

500
99
101-10000011111111001110000000100110010010011101101001101011010101001010010100111101011011111110110
--1--------11--------1--------1------------1--------------1--------------1-----------11---11-------
------------1--------1---------------------1--------------1---------------------------1---1--...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #32:

score: 0
Accepted
time: 15ms
memory: 3640kb

input:

500
99
010-00101111101100011101001101000100011110011011010000011111100101000000111111011101011110110101001
------1----------------1--11-----1-----11-----1-----------1--------------------------11-1-1--1-----
-----------------------1---------1-----1------1--------------------------------------1----1--...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #33:

score: 0
Accepted
time: 8ms
memory: 3644kb

input:

500
99
001-11110110001110110001000110111101001110101111101001111100100000100111101001011000001110011000010
--1------------------------1--1--1------1-1--111------------------1-------------------1----11----1-
--1------------------------1--------------1--11---------------------------------------1------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #34:

score: 0
Accepted
time: 22ms
memory: 3880kb

input:

500
99
101-01000000100110100101010100111000001111100000010111010010010011110011111111110101111010101011101
------------------1--1-1-1-1----------11--1----------1------------1----------1-------1-------------
-----------------------1--------------11--1-----------------------1------------------1-------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #35:

score: 0
Accepted
time: 25ms
memory: 3876kb

input:

500
99
001-11101101100010111110100110001011000000100010111001111110111011011110011111001001001010001000101
--1---------1-----11-1-------------------------------1----------1---1----1---1---------------------
------------1-----11---------------------------------------------------------1---------------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #36:

score: 0
Accepted
time: 22ms
memory: 3576kb

input:

500
99
000-11101101110101111111101110110011110001010101110110101010001000010010110110011010000110001001001
-----------111-----1-111--111--------------------------------------------1------------------1------
-----------1-------1--11--1-1----------------------------------------------------------------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #37:

score: 0
Accepted
time: 35ms
memory: 3556kb

input:

500
99
011-10001100000100001000111111110100101001001101111101000001011111010111011001101000111100110110110
---------1---------------1-1111--------------------1------------1------1-----1------------1------1-
---------------------------111----------------------------------1------------1------------1--...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #38:

score: 0
Accepted
time: 14ms
memory: 3524kb

input:

500
99
001-11000000101010111000111111011100010011101101101101101110101101101011011001000100110000001110011
--1---------1-----1------1---1----------1-1--------1-1----1-------1-1--1-1-------------------------
--1---------1---------------------------1-1----------------------------1-1-------------------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #39:

score: 0
Accepted
time: 6ms
memory: 3796kb

input:

500
99
110-00001010111000100000111110110101111101100010011001101011111001101100010110111110101110010100001
-------------1----1------11---1-------1---1----------1----1--------------1--------1---1-1----1-----
------------------1-------------------1---1------------------------------1--------1-----1----...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #40:

score: 0
Accepted
time: 22ms
memory: 3576kb

input:

500
99
111-00001011100111001110000111111001111110001111001001010110000101001101011111011011000111110000110
-----------1----------1----1--1-------111----11---------------------1--------1----------1-1------1-
---------------------------------------11-----1---------------------1---------------------1--...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #41:

score: 0
Accepted
time: 29ms
memory: 3676kb

input:

500
99
101-11000011111100001111011110101110110100110101000110010100110101101010111001100110110101000001100
---------------------111-1-1-----1---1-------1-----1--------1-----1-1--------1----1----------------
-----------------------1---------1-----------------1--------1-------1-------------1----------...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #42:

score: 0
Accepted
time: 9ms
memory: 3636kb

input:

500
99
011-11111110110101001100010110000100110011010010011010011111001111100011110001111100100110110101010
--1---1--1---1-------1---1-1-----1------1-----------------------1-1----1---------1------1-11-------
------1------1-------1---1---------------------------------------------1---------1------1-1--...

output:

test 39 89 57 0 92 67 60 48 14 79 87 18 49 9 59 28 44 12 66 35 91 71 37 96 90 85 80 16 68 42 51 43 38 73 20 95 23 33 1 84 58 30 32 17 47 56 45 8 13 82 31 64 61 99 74 46 3 41 15 7 53 83 72 52 81 19 6 29 75 98 22 63 34 55 69 86 94 97 10 27 65 50 62 40 26 76 11 93 2 25 21 5 88 77 36 24 78 70 54
test 0 ...

result:

ok correct

Test #43:

score: 0
Accepted
time: 16ms
memory: 3524kb

input:

500
100
0000100111000110110110000110001001000110000011111111011011010111110001101110111010101000001100010110
----1--------------1------1---1--1----1-----------------1------1---------1---1--1---1---------------
----1-------------------------1--1----------------------1--------------------1--1---------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #44:

score: 0
Accepted
time: 29ms
memory: 3572kb

input:

500
100
1101000100110111011011001101100110111011101000010011010110100111010101000001111000001010010011001100
----------11---1--------1-----------------1----1-------1-------1-1-1-------1-1----------------------
----------11-----------------------------------1-----------------1-1-------1--------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #45:

score: 0
Accepted
time: 25ms
memory: 3676kb

input:

500
100
0000011111010000001001111110100101010100111000111111001010111010101000000001110010110010010111010111
-----------1------1-------1------1--------1----11--1--1-1---1----------------1--------1-----------1-
-----------1------1--------------1-------------1--------1--------------------1------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #46:

score: 0
Accepted
time: 22ms
memory: 3800kb

input:

500
100
1110111000101110100100101011001100011100000001111001101110111011001000000111111110000011011000101101
------------------------1------------1--------111-----11----1------------0-1-1--------1--1---------1
-------------------------------------1----------1-----------1--------------1-1------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #47:

score: 0
Accepted
time: 25ms
memory: 3872kb

input:

500
100
0110110001101111101001100111100101011000001101010110011010011110001010010100010101100110101101100111
-------------1-11---------1--------------------1--1---1-----1-------1----1---1---------------1----11
-------------1--1-------------------------------------------1----------------1------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #48:

score: 0
Accepted
time: 17ms
memory: 3576kb

input:

500
100
1100100101100110010001111111100001111000001011010011110010010011011101101000100001001001110011110111
----1-----1--1---1------1-1------1--------1----1--------1------1-1-1-------------------------------1
----1--------1----------1-----------------1------------------------1----------------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #49:

score: 0
Accepted
time: 25ms
memory: 3640kb

input:

500
100
0101010010110100000011110110110001010110100101110111111100000101101010110010100110101101110000111100
---1---------1------------------------1-1-----11--111-1-------------1--1------------1--1------------
-------------1------------------------1-----------1--------------------1------------1--1--...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #50:

score: 0
Accepted
time: 11ms
memory: 3576kb

input:

500
100
1100000111110101110010000111100001100001100001100110010101011111101110101011110100100110100101111010
----------1--1-1----------1------1------1-----1--11----1----1-------1--------1------------------1---
----------1--1-1-----------------1--------------------------1-----------------------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #51:

score: 0
Accepted
time: 25ms
memory: 3864kb

input:

500
100
1101111011001011010000110010001001001101111110100010101000010011111100101110000010011101001111110101
---11------------------1--1-------------1---------1-1-1------------1----11----------1--------1-----1
---11------------------1-------------------------------------------1----------------1-----...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #52:

score: 0
Accepted
time: 20ms
memory: 3860kb

input:

500
100
0111000000011000011111011001101001110011110100100110101011101100110001110011010100100101111000101111
------------------11---11---------------1-----1---1-1------------1-----1---------------1-1----------
------------------------1---------------1-----1---1--------------------1---------------1--...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #53:

score: 0
Accepted
time: 17ms
memory: 3876kb

input:

500
100
1101111010101000101100001000111000001110000100011111101000101001001100011111011111110100000111011111
---1--------1-----------1-----------------------11111-------1------1----1--1-----------------1--1---
------------1-----------1-----------------------11-----------------1-------1--------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #54:

score: 0
Accepted
time: 21ms
memory: 3616kb

input:

500
100
0011010110101111100110001010011101010000111101101000110110111000110001010110111011100110001000111100
---1--------1--1-----------------1--------1-----1---1---1--------------1-1--------------------------
---------------1-----------------1--------1-------------1---------------------------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #55:

score: 0
Accepted
time: 19ms
memory: 3876kb

input:

500
100
1111010110100111001101011100011011110000100011011010110000001100101000111111101111100110100101110000
---1------1--1-1--11----1-----1--1------1------1--1---------1--------------1------------------------
----------1--1-1---1----1-------------------------1---------------------------------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #56:

score: 0
Accepted
time: 30ms
memory: 3580kb

input:

500
100
0101010010000100001011010000111010101111101110001111011011111100111011001100000001011011111010111110
---1---------1----1----1------------------------1--1----1---1----1------11---------------1----------
---1---------1----1----1-------------------------------------------------1---------------1...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #57:

score: 0
Accepted
time: 33ms
memory: 3676kb

input:

500
100
0110001101111100011111001100110011010011101000010101111001101101010000110100101010011110111100111001
------------11-----1----1--------1------1-1----1-----------------1-----1--------1-----1--1------1---
-------------1-----1---------------------------------------------1--------------1--------1...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #58:

score: 0
Accepted
time: 22ms
memory: 3644kb

input:

500
100
0110000000111100001110111110010110010111000010100101111101110100101111101100111100011100010110001001
-----------11-----11---11------------1--------1-------1-----------------11----------------------1---
-----------1------11---11------------1----------------------------------------------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #59:

score: 0
Accepted
time: 6ms
memory: 3640kb

input:

500
100
1111000010100000010011100111111011010100010111001101111001111110000001011100110001010110011111010100
---1-------------1------------1-1----1----------11--1-1----------------111---1-----------1----------
------------------------------1------1--------------1-1----------------11-----------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #60:

score: 0
Accepted
time: 15ms
memory: 3868kb

input:

500
100
1111100111100100001110001111000110010110000010000110111010010010101001010111110011111001110110110111
---11--------1----1-----1------------1-----------1------1--------------1-1---1------1--1----------1-
----1--------1------------------------------------------1--------------1---------------1--...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #61:

score: 0
Accepted
time: 22ms
memory: 3832kb

input:

500
100
0011110010101100110111010111001011100011100101011001100100100011111000010111101100100110111011011100
---1------1--1--1------1------1-------1---------1--11--1---------------1---1-------------1----------
----------1--1--1------1----------------------------1------------------1------------------...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #62:

score: 0
Accepted
time: 19ms
memory: 3512kb

input:

500
100
0001111111110100001101000101100100001101100001111111000011011111000001010010111011011111111010101101
---1-------1-1-----1------------------------------11-----------1-------------1--1---1-1--1----------
-----------1-1-----1------------------------------1-----------------------------1-----1---...

output:

test 50 25 38 9 45 52 87 34 4 27 35 93 30 89 100 54 22 82 65 62 72 17 55 40 2 31 10 56 66 13 26 99 42 8 11 48 94 3 46 24 71 33 77 53 5 39 80 36 59 1 86 6 44 16 23 28 96 81 49 74 67 20 78 70 19 29 61 98 95 64 41 21 84 60 85 79 43 63 76 47 58 18 88 73 75 51 7 83 14 91 90 97 12 37 69 57 92 68 32 15
tes...

result:

ok correct

Test #63:

score: 0
Accepted
time: 13ms
memory: 3844kb

input:

339
85
1011111100000010100001111000-10111011110011101010110110100011010001011110010101000000
------1--------------1111----1--1--1--1---11---1-1---1------1-----1-1--1-------------
------1--------------1-11-------------1---1-------------------------1--1-------------
-----------------------11----------...

output:

test 39 82 57 54 24 67 60 48 14 79 31 18 49 9 36 28 44 12 66 35 59 71 37 5 51 85 80 16 0 42 11 43 70 73 20 15 23 78 1 84 58 30 32 17 47 56 45 8 13 77 25 64 61 4 74 46 3 41 21 7 53 83 72 52 81 19 6 76 75 33 22 63 34 55 69 68 50 38 10 27 65 2 62 40 26
test 0 0 0 0 0 0 44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 50...

result:

ok correct