QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#342273#313. Equation Mod 2yoy68#AC ✓780ms6996kbC++141.4kb2024-03-01 10:17:012024-03-01 10:17:02

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

100 95
0 0 0 1 1 0 1 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 1 0 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 1 0 0 0 0 1 0 1 1 1 1 1 0 0 1 0 1 1 0 1 0 1
0 0 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 1 0 1...

output:

0 1 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 

result:

ok good solution

Test #2:

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

input:

100 4
0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0
0 1 0 0 0 1 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 ...

output:

1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

result:

ok good solution

Test #3:

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

input:

100 34
0 0 0 1 0 1 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0
1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0...

output:

0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

result:

ok good solution

Test #4:

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

input:

100 183
0 0 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 0 0 1 1 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0
1 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 0 ...

output:

0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 1 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 1 1 1 0 1 1 0 0 0 1 

result:

ok good solution

Test #5:

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

input:

100 173
1 1 0 1 0 1 1 1 1 1 0 0 1 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1 1 1 0 0 0 1 0 1 0 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0
0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 ...

output:

1 0 1 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 1 0 0 0 

result:

ok good solution

Test #6:

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

input:

100 99
0 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 0 0 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 0 1 0 0 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 1 1 0 0 1
0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 1 0...

output:

1 1 0 1 0 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0 1 0 1 0 1 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0 1 1 0 1 

result:

ok good solution

Test #7:

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

input:

100 199
0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 1 1 1 0 1 1 0 1 1 0 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 1 0 1 1 1 1 0 1 0
1 0 0 0 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 1 1 1 1 ...

output:

0 1 0 1 0 0 1 1 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0 1 1 1 1 1 1 1 1 0 1 1 0 1 0 1 1 0 1 0 0 0 0 1 1 1 0 1 1 0 1 1 

result:

ok good solution

Test #8:

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

input:

100 28
1 0 1 1 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 1 1 1 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1
0 0 0 1 1 0 1 0 1 1 1 1 1 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1...

output:

0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

result:

ok good solution

Test #9:

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

input:

100 195
1 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 0 0 0 1 0 0 1 0 0 1 1 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 0 1 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 0 1 1 0 0 1
1 0 1 0 1 1 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 ...

output:

1 0 1 1 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1 0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 

result:

ok good solution

Test #10:

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

input:

100 170
1 0 1 0 0 0 0 1 1 1 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 1 0 0 1 0 1 0 0 1 0 0 1 1 1 1 0 1 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 1 0 1 1 0 0 0 0 1 0 1 1 1 1 1 0 1 1 ...

result:

ok good solution

Test #12:

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

input:

1000 694
1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 0 1 0 0 1 0...

output:

1 1 0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 1 0 ...

result:

ok good solution

Test #13:

score: 0
Accepted
time: 38ms
memory: 4932kb

input:

1000 1613
1 1 1 0 1 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 0 1 0 0 1 0 0 1 1 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...

result:

ok good solution

Test #15:

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

input:

1000 285
1 1 1 0 1 0 0 0 0 1 1 1 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 0 1 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 0 0 1 1 0 0 0 0 1...

output:

1 0 1 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 ...

result:

ok good solution

Test #16:

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

input:

1000 724
1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 1 0 1 0 0 0 1 0 0 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 1 0 0 1 1 1 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1...

output:

0 1 1 1 0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 1 1 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 1 0 0 1 1 1 1 1 0 1 0 0 0 1 ...

result:

ok good solution

Test #17:

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

input:

1000 1038
0 0 0 0 1 1 0 0 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 ...

output:

1 1 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 ...

result:

ok good solution

Test #18:

score: 0
Accepted
time: 36ms
memory: 4876kb

input:

1000 1697
0 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 1 0 1 0 0 1 1 0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 0 0 0 1 0 1 1 0 1 0 0 1 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 0 ...

result:

ok good solution

Test #20:

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

input:

1000 695
0 1 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 0 0 0 1 0 1 1...

output:

1 1 0 0 1 1 1 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 1 ...

result:

ok good solution

Test #21:

score: 0
Accepted
time: 23ms
memory: 4532kb

input:

1000 972
0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 0 1 0 1 1 1 1 0 0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 1 0 1 1 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 ...

result:

ok good solution

Test #23:

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

input:

1000 247
1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 0...

output:

1 0 0 1 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 0 1 1 1 1 1 0 0 0 1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 0 0 1 1 ...

result:

ok good solution

Test #24:

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

input:

1000 808
0 0 1 0 1 0 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 0 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 1 1 0 1...

output:

0 1 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 0 0 0 1 1 0 0 1 1 0 1 1 1 ...

result:

ok good solution

Test #25:

score: 0
Accepted
time: 34ms
memory: 4716kb

input:

1000 1416
1 1 0 1 0 0 1 1 1 1 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 1 0 0 0 ...

output:

0 1 0 1 1 1 0 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 0 1 1 1 1 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 0 ...

result:

ok good solution

Test #26:

score: 0
Accepted
time: 8ms
memory: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 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 ...

result:

ok good solution

Test #28:

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

input:

1000 1155
0 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 1 0 0 0 1 0 1 1 0 0 1 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 1 0 ...

output:

0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 0 0 1 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 0 ...

result:

ok good solution

Test #29:

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

input:

1000 419
0 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 1 1 1 0 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 1 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 0 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 1 1 0 1 1 0 1 1 0 ...

result:

ok good solution

Test #31:

score: 0
Accepted
time: 119ms
memory: 5336kb

input:

2000 2397
1 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 0 1 0 0 0 1 1 1 0 1 1 1 0 1 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 1 1 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0 1 0 0 0 1 1 1 0 0 ...

output:

0 0 0 1 1 1 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1 0 1 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 0 0 1 1 0 ...

result:

ok good solution

Test #32:

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

input:

2000 138
1 0 1 1 1 1 0 1 1 0 1 0 0 0 1 1 1 0 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 1 0 0 1 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 1 1 0 1 0 1 1 1 0 1 0 0 0 0 1 ...

result:

ok good solution

Test #34:

score: 0
Accepted
time: 93ms
memory: 5124kb

input:

2000 1960
0 0 0 1 1 1 0 0 1 1 1 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 0 1 ...

output:

1 1 1 0 0 0 0 1 1 0 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 0 1 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 ...

result:

ok good solution

Test #35:

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

input:

2000 1365
1 1 0 1 1 0 0 0 0 1 0 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 1 1 0 0 1 1 0 1 1 1 1 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 0 1 1 1 0 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1 1 ...

output:

1 0 0 1 1 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 0 1 0 ...

result:

ok good solution

Test #36:

score: 0
Accepted
time: 194ms
memory: 6088kb

input:

2000 3481
1 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 1 1 0 1 0 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 1 1 0 1 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 1 0 1 1 0 1 1 1 0 0 0 1 1 1 1 1 ...

output:

1 1 0 1 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 0 0 0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 0 1 1 0 1 0 0 1 1 1 0 1 1 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 0 0 0 1 1 1 ...

result:

ok good solution

Test #37:

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

input:

2000 1431
1 0 1 0 0 1 1 1 0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0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 1 0 0 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok good solution

Test #39:

score: 0
Accepted
time: 59ms
memory: 4828kb

input:

2000 1617
0 1 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 0 0 0 1 0 0 1 0 0 1 0 1 0 1 0 1 1 1 0 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 1 1 0 1 0 0 0 1 0 1 0 0 1 1 0 1 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 ...

output:

1 1 1 0 1 0 0 1 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 1 1 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 1 1 1 0 1 0 0 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 0 0 ...

result:

ok good solution

Test #40:

score: 0
Accepted
time: 180ms
memory: 5804kb

input:

2000 3211
0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 1 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 1 0 1 0 1 0 1 1 0 1 0 1 1 0 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 ...

result:

ok good solution

Test #42:

score: 0
Accepted
time: 300ms
memory: 6092kb

input:

3000 3492
0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 0 0 1 0 1 0 0 0 1 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 1 1 ...

output:

1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 0 1 0 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 0 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 0 0 1 ...

result:

ok good solution

Test #43:

score: 0
Accepted
time: 351ms
memory: 6376kb

input:

3000 3956
1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 1 0 1 0 0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1 ...

result:

ok good solution

Test #45:

score: 0
Accepted
time: 325ms
memory: 6260kb

input:

3000 3757
1 1 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 1 1 0 0 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 1 1 ...

output:

0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 0 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 1 1 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 0 1 0 1 0 1 1 1 1 0 1 1 1 1 0 1 0 0 ...

result:

ok good solution

Test #46:

score: 0
Accepted
time: 780ms
memory: 6848kb

input:

5000 5000
1 0 1 0 0 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 1 1 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 1 1 1 0 0 1 0 0 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 1 ...

output:

0 0 0 1 0 1 1 0 0 1 0 1 0 1 1 0 0 0 1 1 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 1 0 1 1 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 1 0 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 ...

result:

ok good solution

Test #47:

score: 0
Accepted
time: 717ms
memory: 6868kb

input:

5000 4925
1 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 0 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1 0 1 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 1 1 1 1 0 0 0 0 0 1 0 1 1 0 1 1 0 ...

output:

0 0 0 1 0 0 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 1 0 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0 ...

result:

ok good solution

Test #48:

score: 0
Accepted
time: 720ms
memory: 6996kb

input:

5000 4954
0 1 0 0 0 0 1 1 1 1 1 1 0 0 1 1 1 0 0 1 1 1 0 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