QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#43906#4250. MarsQingyu6 14ms3728kbC++236.0kb2022-08-11 16:15:122023-02-03 23:09:05

Judging History

你现在查看的是测评时间为 2023-02-03 23:09:05 的历史记录

  • [2024-04-28 07:14:37]
  • 管理员手动重测本题所有提交记录
  • 测评结果:6
  • 用时:8ms
  • 内存:4064kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-03 23:09:05]
  • 评测
  • 测评结果:6
  • 用时:14ms
  • 内存:3728kb
  • [2022-08-11 16:15:12]
  • 提交

answer

#include <bits/stdc++.h>
#include "mars.h"
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
using namespace std;

#define x first
#define y second
#define mkp make_pair
#define pb push_back
typedef pair<int, int>pii;
typedef vector<int>vi;

#define maxn 200005
#define inf 0x3f3f3f3f

string expand(string s) {
    while (s.size() < 100)
        s += '0';

    return s;
}

string enc(vi o, int num) {
    int siz = o.size();
    string res;
    For(i, 0, siz - 1) {
        int j = i;

        if (!o[i])
            continue;

        while (j + 1 < siz && o[i] == o[j + 1])
            ++j;

        bool l = 0, r = 0;
        Rep(k, i - 1, 0)l |= (o[k] == o[i]);
        For(k, j + 1, siz - 1)r |= (o[k] == o[i]);
        res += (l + '0');
        res += (r + '0');
        i = j;
    }
    res = expand(res);

    For(i, 0, 9)if (num >> i & 1)
        res[i + 90] = '1';

    return res;
}

vi dec(string s) {
    vi res, stk;
    int c = 0;

    for (int i = 0; i < 90; i += 2) {
        bool l = (s[i] & 1), r = (s[i + 1] & 1);

        if (!l && !r)
            res.pb(++c);

        if (!l && r)
            ++c, res.pb(c), stk.pb(c);

        if (l && !r)
            res.pb(stk.back()), stk.pop_back();

        if (l & r)
            res.pb(stk.back());
    }

    return res;
}

int n, mp[55][55], fa[55 * 55], allc;
inline int P(int x, int y) {
    return x * (2 * n + 1) + y;
}
inline int getf(int x) {
    while (x != fa[x])
        x = fa[x] = fa[fa[x]];

    return x;
}
inline void merge(int x, int y) {
    x = getf(x), y = getf(y), fa[x] = y;
}

bool vis[55 * 55];
int col[55][55];
int getcnt(int x) {
    For(i, 0, allc - 1) vis[i] = 0;

    For(i, 0, 2 * n) For(j, 0, 2 * n) if (i == x || j == x)
        vis[getf(P(i, j))] = 1;

    int res = 0;

    For(i, 0, 2 * n) For(j, 0, 2 * n) if (mp[i][j] && getf(P(i, j)) == P(i, j) && !vis[P(i, j)])
        ++res;

    return res;
}
int getres() {
    int res = 0;

    For(i, 0, 2 * n) For(j, 0, 2 * n) if (mp[i][j] && getf(P(i, j)) == P(i, j))
        ++res;

    return res;
}

string process(vector<vector<string>>a, int x, int y, int k, int N) {
    n = N;

    if (x < 2 * (n - k - 1) && y < 2 * (n - k - 1))
        return a[0][0];

    if (y != 2 * (n - k - 1)) {
        string res;
        res += a[0][0][0];
        res += a[1][0][0];
        For(i, 0, 2 * k)res += a[2][0][i];
        res += a[0][1][0], res += a[1][1][0];
        For(i, 0, 2 * k)res += a[2][1][i];
        return expand(res);
    }

    if (x != 2 * (n - k - 1)) {
        string res;
        res += a[0][0][0];
        res += a[0][1][0];
        For(i, 0, 2 * k)res += a[0][2][i];
        res += a[1][0][0], res += a[1][1][0];
        For(i, 0, 2 * k)res += a[1][2][i];
        return expand(res);
    }

    //  cout<<x<<" "<<y<<" "<<k<<" "<<N<<endl;
    //  For(i,0,2)For(j,0,2)cout<<a[i][j]<<"\n";puts("----");

    // clear:
    allc = (2 * n + 1) * (2 * n + 1);
    For(i, 0, 2 * n)For(j, 0, 2 * n)col[i][j] = mp[i][j] = 0;
    For(i, 0, allc - 1)fa[i] = i;

    // k=0:
    if (k == 0) {
        For(i, 0, 2)For(j, 0, 2)mp[x + i][y + j] = a[i][j][0] & 1;
        For(i, x, x + 2)For(j, y, y + 2)

        if (mp[i][j]) {
            if (mp[i + 1][j])
                merge(P(i, j), P(i + 1, j));

            if (mp[i][j + 1])
                merge(P(i, j), P(i, j + 1));
        }

        if (x == 0 && y == 0) {
            string res(100, '0');
            int x = getres();
            For(i, 0, 9) res[i] = '0' + (x >> i & 1);
            return res;
        }

        vi tmp;
        Rep(i, 2 * k + 4, 0)tmp.pb(mp[x + i][y]*getf(P(x + i, y)));
        For(i, 1, 2 * k + 4)tmp.pb(mp[x][y + i]*getf(P(x, y + i)));
        return enc(tmp, getcnt(x));
    }

    // getlst:
    vi lst = dec(a[2][2]);
    int lstres = 0;

    For(i, 0, 9) if (a[2][2][i + 90] & 1)
        lstres |= (1 << i);

    // getmap:
    For(i, 0, 1)For(j, 0, 1)mp[x + i][y + j] = a[i][j][0] & 1;
    For(i, 0, 2 * k) {
        For(j, 0, 1) {
            mp[x + i + 2][y + j] = a[2][j][i] & 1;
            mp[x + j][y + i + 2] = a[j][2][i] & 1;
        }
        mp[x + i + 2][y + 2] = a[2][1][i + 2 * k + 1] & 1;
        mp[x + 2][y + i + 2] = a[1][2][i + 2 * k + 1] & 1;
    }

    // getlink:
    For(i, 0, 2 * n)For(j, 0, 2 * n)

    if (mp[i][j]) {
        if (mp[i + 1][j])
            merge(P(i, j), P(i + 1, j));

        if (mp[i][j + 1])
            merge(P(i, j), P(i, j + 1));
    }

    vector<pii>p;
    Rep(i, 2 * k + 2, 0)p.pb(mkp(x + i + 2, y + 2));
    For(i, 1, 2 * k + 2)p.pb(mkp(x + 2, y + i + 2));
    int np = 0, siz = p.size();
    For(i, 0, siz - 1) {
        int j = i, x = p[i].x, y = p[i].y;

        if (!mp[x][y])
            continue;

        col[x][y] = lst[np];

        while (j + 1 < siz && mp[p[j + 1].x][p[j + 1].y])
            ++j, col[p[j].x][p[j].y] = lst[np];

        i = j;
        ++np;
    }

    //  cout<<"lst: "<<lstres<<endl;
    //  For(i,0,2*n)For(j,0,2*n)cout<<mp[i][j]<<" \n"[j==2*n];
    //  for(auto t:p)cout<<t.x<<" "<<t.y<<endl;
    //  For(i,0,2*n)For(j,0,2*n)cout<<col[i][j]<<" \n"[j==2*n];

    For(i, 0, siz - 1) {
        int c1 = col[p[i].x][p[i].y];

        if (!c1)
            continue;

        For(j, i + 1, siz - 1) {
            int c2 = col[p[j].x][p[j].y];

            if (c1 == c2)
                merge(P(p[i].x, p[i].y), P(p[j].x, p[j].y));
        }
    }

    if (!x && !y) {
        //      For(i,0,2*n)For(j,0,2*n)cout<<getf(P(i,j))*mp[i][j]<<" \n"[j==2*n];
        string res(100, '0');
        int x = getres() + lstres;
        For(i, 0, 9) res[i] = '0' + (x >> i & 1);
        return res;
    }

    vi tmp;
    Rep(i, 2 * k + 4, 0)tmp.pb(mp[x + i][y]*getf(P(x + i, y)));
    For(i, 1, 2 * k + 4)tmp.pb(mp[x][y + i]*getf(P(x, y + i)));
    return enc(tmp, lstres + getcnt(x));
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 6
Accepted

Test #1:

score: 6
Accepted
time: 14ms
memory: 3684kb

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
2
934 389 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0011010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
f18fba32-f6de-4dd0-ef1b-ea027937a4aa
010000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
5
934 390 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0011010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
935 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1110010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1100000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
933 391 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1110010000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
3
935 391 626 427
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
5
935 391 626 427
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
4
935 391 626 427
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
5
935 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100100000000000000000000000000000000000000000000000000000000...

result:

ok 1 number(s): "1"

Test #2:

score: 6
Accepted
time: 14ms
memory: 3720kb

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
7
933 391 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1101100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1111110000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1011110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
14
933 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
15
934 391 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
10
933 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1110110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
17
933 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

result:

ok 1 number(s): "1"

Test #3:

score: 6
Accepted
time: 10ms
memory: 3648kb

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
7
933 391 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0001110000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0101100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
14
933 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
15
934 391 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
10
933 390 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 390 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
17
933 390 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

result:

ok 1 number(s): "1"

Test #4:

score: 6
Accepted
time: 13ms
memory: 3728kb

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
7
933 391 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1111010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000110000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0011010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
14
933 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
15
934 391 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
10
933 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1011110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
17
933 390 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0111010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1110010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

result:

ok 1 number(s): "1"

Test #5:

score: 6
Accepted
time: 12ms
memory: 3716kb

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
7
933 391 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1010010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1010010000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0011010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
14
933 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
15
934 391 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
10
933 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1011110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
17
933 390 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0100110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0011010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0010010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

result:

ok 1 number(s): "1"

Test #6:

score: 6
Accepted
time: 10ms
memory: 3720kb

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
7
933 391 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1010100000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1011010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
14
933 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0110110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
15
934 391 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
10
933 390 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
17
933 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
934 389 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1011010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

result:

ok 1 number(s): "1"

Subtask #2:

score: 0
Wrong Answer

Test #7:

score: 0
Wrong Answer
time: 10ms
memory: 3700kb

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
33
935 391 626 430
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
28
932 387 626 425
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
46
935 386 626 430
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
54
935 389 626 425
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1110010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
30
932 388 626 425
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
30
935 387 626 425
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
43
935 390 626 425
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 111011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1011110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
34
935 389 626 425
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 011011100101100011000011000001101110011000...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000...

result:

wrong answer 1st numbers differ - expected: '1', found: '0'

Subtask #3:

score: 0
Skipped

Subtask #4:

score: 0
Skipped

Subtask #5:

score: 0
Skipped

Subtask #6:

score: 0
Skipped

Subtask #7:

score: 0
Skipped

Subtask #8:

score: 0
Skipped

Subtask #9:

score: 0
Skipped

Subtask #10:

score: 0
Skipped