QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#483581#6150. 拼图ax_by_c100 ✓223ms5080kbC++172.7kb2024-07-18 19:52:302024-07-18 19:52:30

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 10
Accepted
time: 1ms
memory: 3796kb

input:

1
1 30
30
000000000000001000000000000000
000000000000000100000000000000
000000000000101000000010100001
000000000000000000010100000001
000100000000000000000001100000
000001000000000000000000000000
000000000100000000000000000000
000000000000000000000000000000
100000000000000000000000000000
00000100001...

output:

247

result:

ok 1 number(s): "247"

Test #2:

score: 10
Accepted
time: 22ms
memory: 4624kb

input:

1
2 100
89
00000000000000000000000000000001000000000000000000000000000001000000000010000000000000000
00000000000001000010000000011000100000001010000000000000000001000000000000000000000000010
10000000000000000000000000000000000000000000000001010001000000000000000000000000000000000
0000000000001000000...

output:

1554

result:

ok 1 number(s): "1554"

Test #3:

score: 10
Accepted
time: 159ms
memory: 4952kb

input:

1
3 1000
28
0000000000000100000000000000
0000000100000000000000000000
0000100000000000000000000000
0000000000000000000000000000
0000000000000000000000000000
0000000000000000000000000000
0000000000000000000000000000
0000000000000000000000000000
0000000000000000000000000000
000000000000001000000000000...

output:

4224

result:

ok 1 number(s): "4224"

Test #4:

score: 10
Accepted
time: 52ms
memory: 4948kb

input:

1
300 100
5
00001
00101
00000
00000
00010
00000
00000
00000
00000
10000
00000
00000
00000
00000
00010
00000
00100
00010
10000
00000
00000
00000
00000
00000
00001
00000
00100
00000
00000
00000
00000
00000
00000
00000
00000
01001
01000
00100
00000
00000
00000
10001
00000
00000
00100
00000
01000
00000
...

output:

18360

result:

ok 1 number(s): "18360"

Test #5:

score: 10
Accepted
time: 119ms
memory: 4948kb

input:

3
12 6000
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
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
...

output:

17840
27720
15975

result:

ok 3 number(s): "17840 27720 15975"

Test #6:

score: 10
Accepted
time: 95ms
memory: 5080kb

input:

3
12 5000
2
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
10
00
01
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
01
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
...

output:

26850
9570
85430

result:

ok 3 number(s): "26850 9570 85430"

Test #7:

score: 10
Accepted
time: 217ms
memory: 5020kb

input:

3
30 1000
5
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00010
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
...

output:

9930
90120
13964

result:

ok 3 number(s): "9930 90120 13964"

Test #8:

score: 10
Accepted
time: 223ms
memory: 5004kb

input:

3
9 10000
1
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
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
...

output:

13698
88380
8232

result:

ok 3 number(s): "13698 88380 8232"

Test #9:

score: 10
Accepted
time: 83ms
memory: 4960kb

input:

3
300 100
9
000000000
000000000
000001000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
000000000
00000000...

output:

14706
19680
89240

result:

ok 3 number(s): "14706 19680 89240"

Test #10:

score: 10
Accepted
time: 86ms
memory: 5068kb

input:

3
9000 10
2
00
10
00
00
00
00
00
00
00
00
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
...

output:

92340
30653
40296

result:

ok 3 number(s): "92340 30653 40296"