QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#562052#8189. InterpolateAfterlife#AC ✓226ms4988kbC++201.6kb2024-09-13 14:38:402024-09-13 14:38:41

Judging History

你现在查看的是最新测评结果

  • [2024-09-13 14:38:41]
  • 评测
  • 测评结果:AC
  • 用时:226ms
  • 内存:4988kb
  • [2024-09-13 14:38:40]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

const int N=2e3+1e2+7;

bitset<N> x[N];

int y[N];

int n,m;

bitset<N> a[N];

int b[N];

vector<bitset<N> >v;

int c[N];

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>n>>m;
    for(int i=1;i<=m;i++)
    {
        string s;
        cin>>s;
        for(int j=0;j<n;j++)
            x[i].set(j,s[j]-'0');
        cin>>y[i];
    }
    vector<int> ord(m);
    iota(ord.begin(),ord.end(),1);
    sort(ord.begin(),ord.end(),[&](const int &a,const int &b){
        return x[a].count()<x[b].count();
    });
    for(auto e:ord)
    {
        for(auto s:v)
            if((s&x[e]).count()==s.count())
                y[e]^=1;
        auto X=x[e];
        auto Y=y[e];
        int fd=0;
        for(int i=0;i<n;i++)
        {
            if(!X.test(i))
                continue;
            if(!a[i].test(i))
            {
                fd=1;
                a[i]=X,b[i]=Y;
                break;
            }
            X^=a[i];
            Y^=b[i];
        }
        if(!fd&&Y)
            v.push_back(x[e]);
    }
    for(int i=n-1;i>=0;i--)
    {
        if(!a[i].test(i))
            continue;
        int B=b[i];
        for(int j=i+1;j<=n-1;j++)
            if(a[i].test(j))
                B^=c[j];
        c[i]=B;
    }
    for(int i=0;i<n;i++)
    {
        if(!c[i])
            continue;
        for(int j=0;j<n;j++)
            cout<<(i==j);
        cout<<"\n";
    }
    for(auto w:v)
    {
        for(int i=0;i<n;i++)
            cout<<(int)w.test(i);
        cout<<"\n";
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2 3
01 1
10 1
11 1

output:

10
01
11

result:

ok Ok

Test #2:

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

input:

3 2
000 0
111 1

output:

100

result:

ok Ok

Test #3:

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

input:

60 10
000111000111010111101000110000101110010001010011100100001001 0
110111110110100011110001001100000111110101111001100011001000 1
100000011101101010111010100010010110010101001111100011101001 0
001101010101001101101110011100000011110000110111001011011101 1
000010011001010100101000100011010010000000...

output:

100000000000000000000000000000000000000000000000000000000000
010000000000000000000000000000000000000000000000000000000000
000100000000000000000000000000000000000000000000000000000000
000000100000000000000000000000000000000000000000000000000000
00000000100000000000000000000000000000000000000000000000...

result:

ok Ok

Test #4:

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

input:

6 5
110011 0
110010 0
000001 0
101101 1
101001 0

output:

000100

result:

ok Ok

Test #5:

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

input:

22 8
0100010110001110110101 0
1001001110101001100111 1
1011110101111101001001 1
0011001101101011011101 0
0101110101100101111010 1
1100011001010001001010 1
0111001110010101001010 0
1010010110000000110100 1

output:

0010000000000000000000
0000000000100000000000
0000000000010000000000

result:

ok Ok

Test #6:

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

input:

3 8
010 1
101 1
100 0
000 1
001 0
110 0
011 0
111 1

output:

100
001
000

result:

ok Ok

Test #7:

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

input:

3 3
101 1
110 0
001 1

output:

001

result:

ok Ok

Test #8:

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

input:

1 2
0 1
1 1

output:

0

result:

ok Ok

Test #9:

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

input:

1 1
0 1

output:

0

result:

ok Ok

Test #10:

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

input:

1 1
1 1

output:

1

result:

ok Ok

Test #11:

score: 0
Accepted
time: 95ms
memory: 4916kb

input:

2000 2000
11100100011011110000001001110110111111101011011100000110011001100110000100110100011111110100110101100110100010110101110000000011101001110001000110001111001110100011001011111111011001011001011111100100001100110000001011100101001001111110100001000100001101000111101000110110011110000101101101...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #12:

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

input:

2000 500
100001000111101110100001101010101101010010001100000110111011000010101000000011111100101001011110111011000000001110111001100000000000000001100101111111111001111100110001011011001001100111011010111100101100000101100011001000110011000010000110000110110000100111010001000011011100100000000111001...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #13:

score: 0
Accepted
time: 153ms
memory: 4424kb

input:

500 2000
010101011111000101011111000001000011011110101110111001101100011100110111010000010111110001011100111010100110000111000100000010000001000110010111111100001111011011010011101010011000010001100101110101001011000011010101000110001011111011001110111010100101011010000010001100000001100011100001110...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #14:

score: 0
Accepted
time: 222ms
memory: 4264kb

input:

20 2000
00001100101111011110 0
01111100010101011100 0
11010110101011100100 0
01011111001110010101 0
10011111101100010011 0
00001100111010011001 1
00000010000000101010 0
10010000010010011110 0
10011100110111010101 1
01010010001101100000 0
01110010110100011111 1
11010110110001000111 1
1101110100001111...

output:

10000000000000000000
01000000000000000000
00010000000000000000
00001000000000000000
00000100000000000000
00000010000000000000
00000000000100000000
00000000000000010000
00000000000000001000
00000000000000000100
00001001000001010001
00010010000010001100
00100101000000000110
10001010000100000001
001011...

result:

ok Ok

Test #15:

score: 0
Accepted
time: 226ms
memory: 4216kb

input:

30 2000
010010110001111000111110010000 0
000111010100110010111001011111 0
010101010000001111011101110101 1
110011111011010011110100010110 1
100010101101001000111011101000 0
110110010111110111110110111010 1
101111010111011111011110101101 0
000100010101010111101001010000 1
0000010011000110100010100001...

output:

100000000000000000000000000000
010000000000000000000000000000
000100000000000000000000000000
000000100000000000000000000000
000000010000000000000000000000
000000000000000000100000000000
000000000000000000001000000000
000000000000000000000010000000
000000000000000000000000100000
000000000000000000000...

result:

ok Ok

Test #16:

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

input:

30 100
000000000110110011011100110010 1
100011110111101111010111001100 0
100011100110011010110100111010 1
101100100010001101101111111101 1
000011110001110110100110010011 1
010000001100100001000000011110 0
110010110111110010011100100001 0
110110111011111100101010110110 0
10010011001111110101110000101...

output:

010000000000000000000000000000
001000000000000000000000000000
000100000000000000000000000000
000010000000000000000000000000
000000010000000000000000000000
000000000000100000000000000000
000000000000000100000000000000
000000000000000000100000000000
000000000000000000000001000000
000000000000000000000...

result:

ok Ok

Test #17:

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

input:

500 30
00101101000101100011100101111001100010110110110111000101001100100100011100000010000101001011110000010100010111011101111011110001001101110001011111010110011011010010111001101110110111101001011100111110011110110111100011100001010111000011100010110000011001001010101111110011101001100001011101000...

output:

010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #18:

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

input:

500 500
1000100111110000000110110001101010010110001000010000101010100100001100111111110001101001010111111110001101011110100001011000000101010001011011100100000001010111111010011100011011001011111010010011111010001001001010001101010101100000011000011000111110111010101010000111110000110010101010100101...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #19:

score: 0
Accepted
time: 57ms
memory: 4000kb

input:

10 1000
1000001001 0
1100000110 1
0011001100 1
1110100101 0
1110100100 1
0101011101 1
0110001000 1
0100001110 0
1001101100 1
1100110111 0
0110000001 1
0101110010 1
0011010001 1
0000000100 1
0100100101 1
0001110000 0
1010101100 1
0000001100 1
1001000110 1
0001110100 0
0101001000 0
1111001100 0
110010...

output:

0001000000
0000000100
0000000001
0000010010
1010000000
0000110000
0010010000
0010000100
1100000000
0000000011
0000011000
0100000100
0000101000
0001000010
0010001000
0100100000
1000000010
1001000000
1000100000
0010100000
0000100010
0011000000
0001000001
0000000101
0110000000
0001000100
0100010100
101...

result:

ok Ok

Test #20:

score: 0
Accepted
time: 48ms
memory: 4000kb

input:

12 1000
101100001111 0
111111101111 1
100000001100 0
001100000010 1
101000111010 0
100110001100 1
101100110001 0
011100100011 1
101010111010 1
000001110011 0
000011011011 1
001101001100 1
100011111110 1
110111010100 0
101101000000 1
101000101110 1
010100011000 1
010000001101 0
011011010110 0
1100001...

output:

100000000000
001000000000
000100000000
000010000000
000001000000
000000000001
000000000000
000000010001
001000100000
000000011000
001000000010
010001100000
000110000001
000000001011
100011000000
101000001000
000001000110
000100011000
001100000100
010000100001
000001010100
000000001101
100100000100
0...

result:

ok Ok

Test #21:

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

input:

10 10
0000010010 0
0001010000 1
0101111010 0
0000000000 0
0101110110 0
0001110111 1
0001110010 1
1111111111 1
0001100000 0
0101111111 0

output:

1000000000
0100000000
0001000000
0000100000
0001110010

result:

ok Ok

Test #22:

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

input:

20 21
11111111111111111111 1
11111111111011111011 0
00000000000000000000 1
10011110111000110011 1
00000010011000110010 1
11111110111011111111 1
00000000011000000000 1
00010010011000110000 1
00011000011000110000 0
11011110111000111011 0
00011110011000110011 0
00011010011000110010 0
111111101111011111...

output:

10000000000000000000
01000000000000000000
00100000000000000000
00000010000000000000
00000000100000000000
00000000000100000000
00000000000010000000
00000000000001000000
00000000000000000000
00000000011000110000
00011010011000110010
10011110111000110011
11111111111011111011

result:

ok Ok

Test #23:

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

input:

500 676
0101011101110010100010101011000010110110101000011001010011011000111010100001000111101000101111001001001001100001110000010010010000101011010001001000000100101010101101101011101100000010111000111001110000111011100101000011001011000010001011110000001101001011000110001111010111101110000001100010...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #24:

score: 0
Accepted
time: 91ms
memory: 4268kb

input:

500 1468
000000000100000100000000000000000000000000010000000010010000000001000000000000000010000000000010000000000000010000000000011010000000011011001000100000110000000000000000000000000000001001001000010000000000000000000000001000000000000000000000010100000000010000001100001011011000000000000100101...

output:

001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #25:

score: 0
Accepted
time: 89ms
memory: 4384kb

input:

800 1617
111111011111111111111111111110111111111111111111111101011111111111111111111111111111111111111111111111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111111011111110111111111111111111111111111111011111111111111111111111111111111111111111111111111111111...

output:

001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #26:

score: 0
Accepted
time: 12ms
memory: 3972kb

input:

800 752
0011001101100010001001010001000000000000000100010001001001000010010000010000010011100111001000100111000001001010000000001000010100000000000000010010000001001100000001101000010000100011000001110000000110100000010000100100001000100000001010000101000001000001000100101000000110101000000000000000...

output:

010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #27:

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

input:

800 809
1101110110001110111001010011100001111110101011011010001110001101000101001100000000011001011000000110000011101000001101111100100011100101100001010011110110101010000011011101001100000110110011000011000001001100011010110100100000101100101001110011000010000000001111001001000010101111100011100010...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #28:

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

input:

2000 221
111111111111111111101011111101111011100111111111111111111110010001111101111111101111111111111111110101110111100111111111111111011111011010101111111011111111101111101110110111101101111011001011110111100110111010001111111100111011011001111101111101011101110111111110101111001110011111111110111...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #29:

score: 0
Accepted
time: 96ms
memory: 4776kb

input:

2000 1955
00000000000000000000010000000000000010000001000010000000000000000000000000000000000000000000000000000000000000010000000010010000000000010000010000001000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000100000000000000...

output:

000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #30:

score: 0
Accepted
time: 92ms
memory: 4788kb

input:

2000 2000
00000000000010010001100000000000000000000000001000000001100000000000000010100000000000000000000000000000010000000000100000000010010011000000000000000000001000000000010000000000011000000010000010010000000000000000000000000000010000000100000000001011000000000001000001101000000000100000000000...

output:

000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #31:

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

input:

2000 211
001011001101100101110010001001000000101001101000101100010000001100100010011001001010011001010001010110100010010001011101000010101100110000100001010100110100101011111111000111000110001100001100111011001111010011110001100110101000111100011001011011101001011001001001010001111000111111101100100...

output:

001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #32:

score: 0
Accepted
time: 74ms
memory: 4648kb

input:

2000 2000
11101111111111111111111111111111111111111111111111111111111110111111111111111111011111111111111111111101111111101111111111111111111111111110111111111111011101111011111111111111111111111101111111111111111111111111111111111111111111111111101110111111111111111111111111111111110111111110111111...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #33:

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

input:

100 110
0000000000000000000000000000000000000000000000000110000000000001000000000000000000000000000000110000 1
1001101111111110111111111110011111101100101101111111011101001101111111100010101101111111101111111100 1
10011011110110101111011111000100101001001000011111110111000001010111101000001001011101...

output:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #34:

score: 0
Accepted
time: 75ms
memory: 4808kb

input:

2000 2000
00000000000000000010001000010000000010000000000000000000000000000000000000000001000010000000000000000000000000000000100000000000000000000000000010000000000000000010000000000000000000000000000001000000000000000000000000000000000100100000000010001000001000000000000000000000000000000000000000...

output:

010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #35:

score: 0
Accepted
time: 104ms
memory: 4740kb

input:

2000 2000
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #36:

score: 0
Accepted
time: 117ms
memory: 4916kb

input:

2000 2000
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #37:

score: 0
Accepted
time: 102ms
memory: 4704kb

input:

2000 2000
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #38:

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

input:

20 20
01001000110111100010 1
11111101110111101110 0
11011100110111110111 1
11001001111111111010 1
11101000111111110010 1
01001000100000100000 0
01000000100010100000 0
00000000100011100010 1
00001000000000000010 1
11111111111111111110 0
11111101110111111110 1
11111101110111101111 1
111111111111111011...

output:

01000000000000000000
00010000000000000000
00001000000000000000
00000010000000000000
00000000010000000000
00000000000100000000
00000000000010000000
00000000000000000001
11111101110111111110
11011110110111111111

result:

ok Ok

Test #39:

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

input:

30 20
110000110000100111100010001000 0
110100110110110111111111101010 1
110010110110101111100010011010 1
111100110111100111101110101001 0
111000110000110111100011001110 1
010000000000000111100010001000 0
110000110000100111000010001000 0
010000100000100111100010001000 0
100000000000100111100000001000...

output:

100000000000000000000000000000
010000000000000000000000000000
001000000000000000000000000000
000001000000000000000000000000
000000010000000000000000000000
000000001000000000000000000000
000000000000010000000000000000
000000000000000010000000000000
000000000000000000000100000000
000000000000000000000...

result:

ok Ok

Test #40:

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

input:

20 30
10000000000101001100 0
11001101010111101100 0
11101001100101001100 0
10100000001111001101 0
10100110111101001111 0
00000000000100001000 0
10000000000100000000 0
00000000000001001000 1
00000000000100001100 1
11111101111111101111 0
11101111010111101100 1
11011111011111111101 1
110011011101111111...

output:

10000000000000000000
01000000000000000000
00000010000000000000
00000001000000000000
00000000010000000000
00000000001000000000
00000000000100000000
00000000000010000000
00000000000000010000
00000000000000001000
00000000000000000100
00000000000000000010
11101000001111101101
11100001011111001101
101111...

result:

ok Ok

Test #41:

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

input:

25 25
1001011100101000101000100 0
1001011101111000111000110 0
1101011111101011101111110 0
1101011100111110101110111 0
1111111101101000111100110 0
1000001100101000101000100 1
0001011000100000101000100 0
1001011000001000001000100 1
0001011000101000101000000 1
1001011101111011111000110 1
10111111011110...

output:

1000000000000000000000000
0000010000000000000000000
0000001000000000000000000
0000000010000000000000000
0000000001000000000000000
0000000000100000000000000
0000000000010000000000000
0000000000001000000000000
0000000000000010000000000
0000000000000000001000000
0000000000000000000100000
00000000000000...

result:

ok Ok

Test #42:

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

input:

100 100
1000011111001000011001000010110010000101000100000111011000011001000010101011011110001001000101100000 0
1100111111101001111001110010110111110101000100110111011011011111100010111111011110101001001101110111 1
10100111110011011110110000101100100011110011101001111110000111010111111010110111111111...

output:

0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #43:

score: 0
Accepted
time: 2ms
memory: 3716kb

input:

200 200
10110110010001110100111011111100000010000010101001100111100100100111010010010001000011000010011100010111000100010000001000011010010000100000010011101001101010000010110100000100010000000001100000011100 1
10110110110001110111111011111101001110010010101111100111110111100111011011011001001011001...

output:

10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #44:

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

input:

500 500
1011000010010001101101100000111010000111011000010000100001100000100011111100101011010111010000101000010111000011110101100011110110010000010001101111110001101000011000100011100001100000011010111010011000010101010011101001011010001010010000000111000110010111111101101001100000000010011100001010...

output:

010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #45:

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

input:

750 750
0110010110110111000011110010010001000011000011111001101100101011101100101011111011011000110101100001011101010010100011100001011010000000101011000001000001010010000000110000100100110001000100101010111000110010101000001000000001000110101110010001101001011010010110101001010000000100011000000010...

output:

010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #46:

score: 0
Accepted
time: 99ms
memory: 4988kb

input:

2000 2000
11100100010000011010101001011011101110110101100100001101010000001010100000101010000100001111000000100000100001101001110101111000100110000001011011011000110111001100101100101110000110011111110110111111010111101001010001101001100001011011001010000101000000001011111010010010010110000101111000...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #47:

score: 0
Accepted
time: 96ms
memory: 4724kb

input:

2000 2000
01111000110100101010000010110001100110110010100110110001100010001100011011000010101100000010000011100000000011001101100111011000001100101110010110111100110010110001111001111110100001011010010101110000001100000110000010011101111010001000000100011010110000101100001001000000000011001000010000...

output:

000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #48:

score: 0
Accepted
time: 90ms
memory: 4756kb

input:

2000 2000
00100100001001010101001100010000100000101001000111011101000001101010101010000001110111101111010000010100110110100011110110001010010000110010000101100010000110100100101001011011100010110011101001011011001100011000110011001111000110110111100001010000100011100110010101100010100010101000000110...

output:

000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #49:

score: 0
Accepted
time: 97ms
memory: 4916kb

input:

2000 2000
01100111101000100001000100000101110110100000000000000100100000101110010101000111101001000001000010100100100101000010100010111110001111110110111000001011110100011011010100000000000010001001000000001001101000101001001000001000111001000100100100010110000000100000011001101001110000110001111010...

output:

000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok