QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#629183#8189. Interpolateship2077AC ✓97ms4488kbC++23794b2024-10-11 08:17:412024-10-11 08:17:42

Judging History

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

  • [2024-10-11 08:17:42]
  • 评测
  • 测评结果:AC
  • 用时:97ms
  • 内存:4488kb
  • [2024-10-11 08:17:41]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
constexpr int M=2005;
string str;
bitset<M>bit[M],ans[M];
int n,m,num,id[M],len[M],val[M];
int main(){
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin>>n>>m;
    for (int i=1;i<=m;i++){
        cin>>str>>val[i];
        for (int j=0;j<n;j++)
            if (str[j]=='1')
                bit[i].set(j),len[i]++;
    }
    iota(id+1,id+m+1,1);
    sort(id+1,id+m+1,[&](int x,int y){return len[x]<len[y];});
    for (int i=1;i<=m;i++){
        const int x=id[i];
        for (int j=1;j<=num;j++)
            if ((ans[j]&bit[x])==ans[j])
                val[x]^=1;
        if (val[x]) ans[++num]=bit[x];
    }
    for (int i=1;i<=num;cout<<'\n',i++)
        for (int j=0;j<n;j++) cout<<ans[i][j];
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3640kb

input:

2 3
01 1
10 1
11 1

output:

01
10
11

result:

ok Ok

Test #2:

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

input:

3 2
000 0
111 1

output:

111

result:

ok Ok

Test #3:

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

input:

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

output:

000010011001010100101000100011010010000000000000011110001010
001011011000001000100101011010101001110000101000010010101001
111010010011000010011110000010100110000111111000100011001000
011110111010011000110000001101111001001110001111000001110010
11011111011010001111000100110000011111010111100110001100...

result:

ok Ok

Test #4:

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

input:

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

output:

101101

result:

ok Ok

Test #5:

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

input:

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

output:

1010010110000000110100
1100011001010001001010
1001001110101001100111
0101110101100101111010
1011110101111101001001

result:

ok Ok

Test #6:

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

input:

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

output:

000
100
001

result:

ok Ok

Test #7:

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

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: 1ms
memory: 3708kb

input:

1 1
0 1

output:

0

result:

ok Ok

Test #10:

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

input:

1 1
1 1

output:

1

result:

ok Ok

Test #11:

score: 0
Accepted
time: 86ms
memory: 4448kb

input:

2000 2000
11100100011011110000001001110110111111101011011100000110011001100110000100110100011111110100110101100110100010110101110000000011101001110001000110001111001110100011001011111111011001011001011111100100001100110000001011100101001001111110100001000100001101000111101000110110011110000101101101...

output:

000000011010111011100000011111010110110001011101001111101110110111010010100001110100111100110111000010001101010101000000010010100001111100010101111000101010111000110011000111000010101010100010110000110001000011000101000111001000000010001111011010010010110010001011001001100101001110100100100010101110...

result:

ok Ok

Test #12:

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

input:

2000 500
100001000111101110100001101010101101010010001100000110111011000010101000000011111100101001011110111011000000001110111001100000000000000001100101111111111001111100110001011011001001100111011010111100101100000101100011001000110011000010000110000110110000100111010001000011011100100000000111001...

output:

000111001100110111000001011101011001010010101101111010001100100011001010010111000100000101110110110111101010010000101011011010001001001111001010011110111100010010110011001011111000101100001111001111000011111111000001001001011111111010001110000010111010001000100111011101100110001001100111001101000111...

result:

ok Ok

Test #13:

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

input:

500 2000
010101011111000101011111000001000011011110101110111001101100011100110111010000010111110001011100111010100110000111000100000010000001000110010111111100001111011011010011101010011000010001100101110101001011000011010101000110001011111011001110111010100101011010000010001100000001100011100001110...

output:

111100000011011000100000011000000100100110110001111011100000000101011010100111000110000101110000001010110101001100001110100011101000101000100000100011111010011100011001111110110111111000100011011001000001000110110111101000100001110000100001110000001100110100001101000011111000101101101000111011000101...

result:

ok Ok

Test #14:

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

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:

00000100011000000000
01100001000000000000
00000000100101000001
00001000000100000110
00000101100010000000
00000011000000000011
00000010111000000000
00000000001001010010
00011000001000010000
00100000000010011100
00101001001001000000
00010101000100000010
10000001000010100001
00001001000001010001
000100...

result:

ok Ok

Test #15:

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

input:

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

output:

000100110011001000000001000000
000010010000001001111000000100
001100000000100000011111000000
110001001010000010010100000010
011000010000001101000110000001
000100100001000100101101100000
000111100101010000000010000001
000000010001101001100110000100
000001010010100001011000100100
100001000010010100010...

result:

ok Ok

Test #16:

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

input:

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

output:

010100111000110010000000000001
010110111000100100000010001000
110100010010000101000001101000
110001000100111010000100110000
110100010110101001001000000010
000000011111100010000110011100
000011110001001001101100100001
110010010000111101010010000100
000000000110110011011100110010
000000011010000001011...

result:

ok Ok

Test #17:

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

input:

500 30
00101101000101100011100101111001100010110110110111000101001100100100011100000010000101001011110000010100010111011101111011110001001101110001011111010110011011010010111001101110110111101001011100111110011110110111100011100001010111000011100010110000011001001010101111110011101001100001011101000...

output:

111001010010010101011001001010101111001001111001000110110010100101000000010100111111000110100111011101101000101000100011111000011100010000101010100111110101111011101001001101000110101111000001110001100110110100111010100100000000001010101011011101110001000001101101101001101100100111010010110000101111...

result:

ok Ok

Test #18:

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

input:

500 500
1000100111110000000110110001101010010110001000010000101010100100001100111111110001101001010111111110001101011110100001011000000101010001011011100100000001010111111010011100011011001011111010010011111010001001001010001101010101100000011000011000111110111010101010000111110000110010101010100101...

output:

010000000000001010110101100010111000100010110100110111111101000001001101001100000001111011010101010010100001011001010101011001100000111100101011000001010100010000101001110111101000011000000001000101101111000001100001010001001110111010101001110100101001110000110010011001001110000000000110010011101111...

result:

ok Ok

Test #19:

score: 0
Accepted
time: 4ms
memory: 3996kb

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:

0000000001
0001000000
0000000100
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: 4ms
memory: 4104kb

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:

000000000000
000000000001
000100000010
000001000010
001000000001
000000010001
000000011000
000100010100
000110000001
100000000101
000000001011
010010010000
101000001000
000001000101
000001000110
001100000100
010000100001
100000011000
000001001100
000000001101
100100000100
000100001001
010000110000
0...

result:

ok Ok

Test #21:

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

input:

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

output:

0001010000
0101111010
0101110110
0101111111
1111111111

result:

ok Ok

Test #22:

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

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:

00000000000000000000
00000000011000110000
00000010011000110010
00010010011000110000
10011010011000110011
10111110111000111011
11011110111000111011
11111110111001111011
11111111111101111011
11111110111101111111
11111110111011111111

result:

ok Ok

Test #23:

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

input:

500 676
0101011101110010100010101011000010110110101000011001010011011000111010100001000111101000101111001001001001100001110000010010010000101011010001001000000100101010101101101011101100000010111000111001110000111011100101000011001011000010001011110000001101001011000110001111010111101110000001100010...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000...

result:

ok Ok

Test #24:

score: 0
Accepted
time: 27ms
memory: 4168kb

input:

500 1468
000000000100000100000000000000000000000000010000000010010000000001000000000000000010000000000010000000000000010000000000011010000000011011001000100000110000000000000000000000000000001001001000010000000000000000000000001000000000000000000000010100000000010000001100001011011000000000000100101...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #25:

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

input:

800 1617
111111011111111111111111111110111111111111111111111101011111111111111111111111111111111111111111111111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111111011111110111111111111111111111111111111011111111111111111111111111111111111111111111111111111111...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #26:

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

input:

800 752
0011001101100010001001010001000000000000000100010001001001000010010000010000010011100111001000100111000001001010000000001000010100000000000000010010000001001100000001101000010000100011000001110000000110100000010000100100001000100000001010000101000001000001000100101000000110101000000000000000...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000...

result:

ok Ok

Test #27:

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

input:

800 809
1101110110001110111001010011100001111110101011011010001110001101000101001100000000011001011000000110000011101000001101111100100011100101100001010011110110101010000011011101001100000110110011000011000001001100011010110100100000101100101001110011000010000000001111001001000010101111100011100010...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #28:

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

input:

2000 221
111111111111111111101011111101111011100111111111111111111110010001111101111111101111111111111111110101110111100111111111111111011111011010101111111011111111101111101110110111101101111011001011110111100110111010001111111100111011011001111101111101011101110111111110101111001110011111111110111...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #29:

score: 0
Accepted
time: 88ms
memory: 4356kb

input:

2000 1955
00000000000000000000010000000000000010000001000010000000000000000000000000000000000000000000000000000000000000010000000010010000000000010000010000001000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000100000000000000...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #30:

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

input:

2000 2000
00000000000010010001100000000000000000000000001000000001100000000000000010100000000000000000000000000000010000000000100000000010010011000000000000000000001000000000010000000000011000000010000010010000000000000000000000000000010000000100000000001011000000000001000001101000000000100000000000...

output:

000000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000...

result:

ok Ok

Test #31:

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

input:

2000 211
001011001101100101110010001001000000101001101000101100010000001100100010011001001010011001010001010110100010010001011101000010101100110000100001010100110100101011111111000111000110001100001100111011001111010011110001100110101000111100011001011011101001011001001001010001111000111111101100100...

output:

000000000000000000110000001000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000100000000000000000010000000100000010000000000000000000000000000000000100000100001000100100000000000...

result:

ok Ok

Test #32:

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

input:

2000 2000
11101111111111111111111111111111111111111111111111111111111110111111111111111111011111111111111111111101111111101111111111111111111111111110111111111111011101111011111111111111111111111101111111111111111111111111111111111111111111111111101110111111111111111111111111111111110111111110111111...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #33:

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

input:

100 110
0000000000000000000000000000000000000000000000000110000000000001000000000000000000000000000000110000 1
1001101111111110111111111110011111101100101101111111011101001101111111100010101101111111101111111100 1
10011011110110101111011111000100101001001000011111110111000001010111101000001001011101...

output:

0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000001000000000000000000000000000000000000000100000000000001000000000000000000000000000000110000
00000000000000000100000010000000000000000000000001100000000000010000000000000000000000000000000000...

result:

ok Ok

Test #34:

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

input:

2000 2000
00000000000000000010001000010000000010000000000000000000000000000000000000000001000010000000000000000000000000000000100000000000000000000000000010000000000000000010000000000000000000000000000001000000000000000000000000000000000100100000000010001000001000000000000000000000000000000000000000...

output:

000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #35:

score: 0
Accepted
time: 84ms
memory: 4372kb

input:

2000 2000
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Ok

Test #36:

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

input:

2000 2000
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Ok

Test #37:

score: 0
Accepted
time: 83ms
memory: 4412kb

input:

2000 2000
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

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:

00001000000000000010
00000000100011100010
01001000110111100010
10110101010101000100
11011110110111110111
11111101110111101111
11111101110111111110
11011110110111111111
11111111111111101111
11111111111111111110

result:

ok Ok

Test #39:

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

input:

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

output:

100100100000000111110110000000
100100110100010101100100100010
000100100110100111010100001010
111000110000110111100011001110
110010110110101111100010011010
111011110110111111100011111010
110111110110101111110011011011
110111110111110111111111101110

result:

ok Ok

Test #40:

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

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:

00000000000001001000
00000000000100001100
10000100010000100100
00001001100101000100
11100001100101000100
11001101010111101100
11101001101111011100
11111111100101001100
11101001110111111100
11101111010111101100
11001101110111111111
11101011111111101101
11011111011111111101

result:

ok Ok

Test #41:

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

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:

1000001000101000001000010
1001011000001000001000100
0001011000101000101000000
1000001100101000101000100
0000011000011000101000110
1000010010100010101001010
1001011100101000101000100
1001011101100001001111010
1001011101111011111000110
1011111101111000111100110
1111111101101000111100110
11010111111010...

result:

ok Ok

Test #42:

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

input:

100 100
1000011111001000011001000010110010000101000100000111011000011001000010101011011110001001000101100000 0
1100111111101001111001110010110111110101000100110111011011011111100010111111011110101001001101110111 1
10100111110011011110110000101100100011110011101001111110000111010111111010110111111111...

output:

1000001010001000000000000000000000000000000100000010000000010000000000001000001010001000000001000000
0000000000001000000000000000110000000101000100000011000000000000000000001000010110001000000000000000
00000000100010000100000000001000100000000000000000010000000100010000000010000101000010000000001000...

result:

ok Ok

Test #43:

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

input:

200 200
10110110010001110100111011111100000010000010101001100111100100100111010010010001000011000010011100010111000100010000001000011010010000100000010011101001101010000010110100000100010000000001100000011100 1
10110110110001110111111011111101001110010010101111100111110111100111011011011001001011001...

output:

00010110000000110100110001111000000000000000101000100000100000100010000000000001000011000010010100010001000000010000000000010010010000100000000000101000000010000010010100000000010000000001000000001100
100100100100001001001100011111000000000000100010011000000000001001110100000000000000000000000101000...

result:

ok Ok

Test #44:

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

input:

500 500
1011000010010001101101100000111010000111011000010000100001100000100011111100101011010111010000101000010111000011110101100011110110010000010001101111110001101000011000100011100001100000011010111010011000010101010011101001011010001010010000000111000110010111111101101001100000000010011100001010...

output:

100100001000000100110100000000100000010001100000000010000100000010000000000010100001001101000000100001001100000010010010001010001001000001000000100101000010100000000010001100000110000000001011000001100000010101000000100101101000101001000000001100010000001101100100100010000000000000100000101000001010...

result:

ok Ok

Test #45:

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

input:

750 750
0110010110110111000011110010010001000011000011111001101100101011101100101011111011011000110101100001011101010010100011100001011010000000101011000001000001010010000000110000100100110001000100101010111000110010101000001000000001000110101110010001101001011010010110101001010000000100011000000010...

output:

000001011011010100000111001001000100000000000010100110100000100100100010001100100001100010010000000100100001001000001010000101101000000010001000000100000101001000000000000010000011000100000000000010100000001010100000000000000100001000000000000110100001101001010000000101000000010001000000000001000000...

result:

ok Ok

Test #46:

score: 0
Accepted
time: 82ms
memory: 4468kb

input:

2000 2000
11100100010000011010101001011011101110110101100100001101010000001010100000101010000100001111000000100000100001101001110101111000100110000001011011011000110111001100101100101110000110011111110110111111010111101001010001101001100001011011001010000101000000001011111010010010010110000101111000...

output:

101001000100000110000000010110110010100101010001000011000100000010100000001000000000000010010000000000001000010010010101011100001000100000010110110100001101000001000010001010100001000101000000001111100001001000000100010010011000000100110000100000010000000000111110100100100100000001000110000010000101...

result:

ok Ok

Test #47:

score: 0
Accepted
time: 83ms
memory: 4488kb

input:

2000 2000
01111000110100101010000010110001100110110010100110110001100010001100011011000010101100000010000011100000000011001101100111011000001100101110010110111100110010110001111001111110100001011010010101110000001100000110000010011101111010001000000100011010110000101100001001000000000011001000010000...

output:

001000000000000000000000000000000000000000000000000000001000000000000000000000000000000000100000100000000000000000010000000000000000000000000100101000000000001000000100000000100000000000100000001000000001000000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Ok

Test #48:

score: 0
Accepted
time: 85ms
memory: 4484kb

input:

2000 2000
00100100001001010101001100010000100000101001000111011101000001101010101010000001110111101111010000010100110110100011110110001010010000110010000101100010000110100100101001011011100010110011101001011011001100011000110011001111000110110111100001010000100011100110010101100010100010101000000110...

output:

000000000010010001000001000000000000000010000001010010010000011010101000000000011100011011010100000000001000001000110000000000000000001100100001010000100000101000001010010010111000101000111010000110110011000110001100000000100000100000110000000000001000001000000000010000101000100010000001000100000010...

result:

ok Ok

Test #49:

score: 0
Accepted
time: 70ms
memory: 4432kb

input:

2000 2000
01100111101000100001000100000101110110100000000000000100100000101110010101000111101001000001000010100100100101000010100010111110001111110110111000001011110100011011010100000000000010001001000000001001101000101001001000001000111001000100100100010110000000100000011001101001110000110001111010...

output:

000001100000001000010000000000000000100000000000000000000000000000100001010001011010000000010000000001000000000000000000100111000010000000000000000010010101000000010000000000000000100010000000000000001010000000000000000000000010000001000001000001000000000000000000011000001100000100000000000000000100...

result:

ok Ok