QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#790709#9056. Matrix FrauddXqwq#AC ✓159ms15844kbC++231.7kb2024-11-28 14:55:312024-11-28 14:55:33

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 4
1100
0101
0011

output:

1

result:

ok single line: '1'

Test #2:

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

input:

10 10
1111111101
1111111011
1111111111
1111111111
1111111101
1111100111
1110111111
1111011011
1111101101
1111111111

output:

10

result:

ok single line: '10'

Test #3:

score: 0
Accepted
time: 158ms
memory: 5504kb

input:

447 447
1000111110111001111111111011101111110011101011100111110101101111001111111101111100111100011110101111011110100101111111011101000111110111101101111011111111110100111101010011101111011110010111111111110011000010111110001111111101101011101110011111111111010110011111111101011001001111101111110111...

output:

59806

result:

ok single line: '59806'

Test #4:

score: 0
Accepted
time: 158ms
memory: 5504kb

input:

447 447
1101111111111111101111011111111111111111101111011101111111111101111111111111111111111111111111111111111110111111111111111101111111011110111111011111111111111111111101111110111111101011111111111111111111111111111110111111111111111111111111111111101111101011111111101110101111011111111110111011...

output:

19984

result:

ok single line: '19984'

Test #5:

score: 0
Accepted
time: 158ms
memory: 5368kb

input:

447 447
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111011111...

output:

2050

result:

ok single line: '2050'

Test #6:

score: 0
Accepted
time: 157ms
memory: 5488kb

input:

447 446
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

1

result:

ok single line: '1'

Test #7:

score: 0
Accepted
time: 154ms
memory: 5372kb

input:

446 447
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

1776

result:

ok single line: '1776'

Test #8:

score: 0
Accepted
time: 157ms
memory: 5496kb

input:

446 447
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

0

result:

ok single line: '0'

Test #9:

score: 0
Accepted
time: 157ms
memory: 5548kb

input:

447 446
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111...

output:

58491

result:

ok single line: '58491'

Test #10:

score: 0
Accepted
time: 157ms
memory: 5464kb

input:

446 447
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

15

result:

ok single line: '15'

Test #11:

score: 0
Accepted
time: 157ms
memory: 5508kb

input:

447 446
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111...

output:

58484

result:

ok single line: '58484'

Test #12:

score: 0
Accepted
time: 158ms
memory: 5500kb

input:

446 447
1111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

0

result:

ok single line: '0'

Test #13:

score: 0
Accepted
time: 154ms
memory: 5512kb

input:

447 446
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

5256

result:

ok single line: '5256'

Test #14:

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

input:

1 1
1

output:

0

result:

ok single line: '0'

Test #15:

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

input:

1 200000
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

0

result:

ok single line: '0'

Test #16:

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

input:

200000 1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

output:

0

result:

ok single line: '0'

Test #17:

score: 0
Accepted
time: 158ms
memory: 5424kb

input:

447 447
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

0

result:

ok single line: '0'

Test #18:

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

input:

1 200000
100001011010111011110101100010010101011110010100011010001011000011100000101100000101111001010101001110110010000010011001000010010100010000110011101011100000010101000011111010010000101010010000010001110110100010010011011000110111110101111010011110000000011000000011011101000010000101011100001...

output:

100380

result:

ok single line: '100380'

Test #19:

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

input:

10 10
0011110010
0011000010
1011100000
1001010100
1001100100
1101111101
1110110000
0000011110
1100101000
0111111000

output:

33

result:

ok single line: '33'

Test #20:

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

input:

100 100
0110011000010110101110111001000111110001101000101001000110101101101010000111011111000001000000011000
1010110010110110111001011110000111000110001100000100100001100011011010010000111011100101101010110100
001001011110001010010111111100101001101110010101001010001111110010111101110010100000011110...

output:

4645

result:

ok single line: '4645'

Test #21:

score: 0
Accepted
time: 41ms
memory: 5644kb

input:

2000 100
1000111101010100101000000001000101101111110011111110110110011110001001101110101010100110111101101111
0100001100001111101000110000101100010000110111101011001100010111001110100111001100011010000001110100
01001110101101111100000001111001001110000110001101011011100001000100101110100100001000011...

output:

98366

result:

ok single line: '98366'

Test #22:

score: 0
Accepted
time: 41ms
memory: 5580kb

input:

100 2000
100001001011100010100001111111011111000011100101111010011111101100010011011101101111101011011100011010000110001001000100011001111001101001011011111000111000011010111110011101000101011011011011100101001110011110100101110011101101111100100011110001000011101010110100101100001111111110100101001...

output:

98340

result:

ok single line: '98340'

Test #23:

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

input:

1000 200
00110111001100010110111000000001001100100110110000100000100110100111010101011011001010100100001001110100001001010001011001110010001010110000001001111001010010000001100011001111000111011111101011111101
000110010000101000111010000011100011001001011001011111100010001111010100001000011011110011...

output:

98084

result:

ok single line: '98084'

Test #24:

score: 0
Accepted
time: 76ms
memory: 5552kb

input:

200 1000
100010101110000010111011111101111111000110011110010000100000001010011101100100011111011011001001101011101011001101100010011011011100100110011101001000111111000001000110000010111011000000000010100000110111001001001000111110110101110100101100010101100000011001111011010001000010110111100010100...

output:

97899

result:

ok single line: '97899'

Test #25:

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

input:

200000 1
0
1
0
1
0
1
1
1
0
1
0
0
1
1
1
0
0
0
1
1
0
1
0
0
1
1
1
0
0
1
1
0
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
0
1
1
0
0
0
0
1
0
1
0
0
1
0
0
1
0
1
1
1
0
1
0
1
0
0
0
0
1
0
0
0
1
1
1
1
0
1
0
1
0
0
0
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
0
1
0
0
1
0
0
0
1
1
1
0
1
1
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1...

output:

99999

result:

ok single line: '99999'

Test #26:

score: 0
Accepted
time: 158ms
memory: 5368kb

input:

447 447
0110010010110010111110000011110000110100000010000011011100010011101110101001101010010101100110000110011110101000101111101010011011110101110011101001000110001111110100101011100011110001100100001100000010010000011011111000011000010011001001010110010101111000000001100110110111100000110110100110...

output:

97785

result:

ok single line: '97785'

Test #27:

score: 0
Accepted
time: 159ms
memory: 5512kb

input:

447 447
1110010100101001000111100001110011110110111001001000101110110101010000111110110101001010010111110010001101101001111100100111100011000101010100100110111011010100011101101101101001101001001101000101111101101100001001101010110100011011001000000000111101000011101100111110010111001100111000011100...

output:

97855

result:

ok single line: '97855'

Test #28:

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

input:

10 10
0000000100
0100000000
1010001100
0001101000
0000000010
0000000000
1100000000
0000000000
0000000000
0000000000

output:

14

result:

ok single line: '14'

Test #29:

score: 0
Accepted
time: 158ms
memory: 5488kb

input:

447 447
0000000110101000001000000110101100010101010000110100100010100001100001000010001000101101110000110011001000000000000000001000100001000001000000111011100000100010100000000001000111100100111110110000100100001100100010100001001011000101001000000101010110000000000001010101000010100001000110011010...

output:

59600

result:

ok single line: '59600'

Test #30:

score: 0
Accepted
time: 158ms
memory: 5424kb

input:

447 447
0000000000000000000100001100001111000100010010000000000000010000000000100000000000000000000000000101000000000100000000001000000000001000010000000000000000000000000010000000000010000000000010000000000001000000100000000000000001000000000000000010000000100000001001000001000000001000000000000001...

output:

19968

result:

ok single line: '19968'

Test #31:

score: 0
Accepted
time: 158ms
memory: 5428kb

input:

447 447
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

2385

result:

ok single line: '2385'

Test #32:

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

input:

2 4
1100
0011

output:

0

result:

ok single line: '0'

Test #33:

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

input:

4 2
10
10
01
01

output:

0

result:

ok single line: '0'

Test #34:

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

input:

1 1
0

output:

1

result:

ok single line: '1'

Test #35:

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

input:

1 200000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

200000

result:

ok single line: '200000'

Test #36:

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

input:

10 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000

output:

10

result:

ok single line: '10'

Test #37:

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

input:

200000 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
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...

output:

200000

result:

ok single line: '200000'

Test #38:

score: 0
Accepted
time: 159ms
memory: 5552kb

input:

447 447
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

447

result:

ok single line: '447'