QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#517519#3201. Cairo CorridorGuanYunchangAC ✓25ms20744kbC++207.1kb2024-08-13 11:59:522024-08-13 11:59:53

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
6 6
010101001001
001000101100
110101001101
010010000100
001110110010
001001101010
6 6
010010110010
001100100111
000110100101
011001100101
100100011100
011010001101

output:

17
NO MINIMAL CORRIDOR

result:

ok 2 lines

Test #2:

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

input:

1
3 4
11110111
01000000
11110111

output:

9

result:

ok single line: '9'

Test #3:

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

input:

7
1 1
00
1 1
10
1 1
01
2 1
00
00
2 1
10
00
3 1
10
00
01
3 1
10
00
00

output:

2
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
3
4
NO MINIMAL CORRIDOR

result:

ok 7 lines

Test #4:

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

input:

9
3 3
000100
100100
001110
3 3
000101
100100
000010
2 3
101111
010001
3 3
000101
100100
001100
3 3
011100
001001
001000
1 56
0001001000010010000100100001001000010010000100100001001000010010000100100001001000010010000100100001001000010010
1 56
000100100001001000010010000100100001001000010010000100100...

output:

NO MINIMAL CORRIDOR
7
5
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
84
NO MINIMAL CORRIDOR
79
NO MINIMAL CORRIDOR

result:

ok 9 lines

Test #5:

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

input:

4
6 6
010101001001
011000101100
110101001101
110010000100
001110000010
001001101010
6 6
101010010010
001010001010
011011101011
001001001011
101010011001
110101001101
6 6
010010110010
001110100111
000110101101
011001100101
100100011100
011010001101
6 6
000010101000
000011010100
110110011101
010000111...

output:

NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR

result:

ok 4 lines

Test #6:

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

input:

8
10 9
101111001001111101
110001101110101101
101101001010010111
011111011100010101
100101001011101101
010110011111011001
101000100001001000
011110110010101110
100100110110100001
000101100111011111
11 11
0110100101010010111101
1011000110100101110100
0011000100111100011010
1111110101100101000100
00011...

output:

29
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
43
NO MINIMAL CORRIDOR
55
NO MINIMAL CORRIDOR

result:

ok 8 lines

Test #7:

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

input:

4
2 2
0010
0011
3 3
111000
010111
100111
11 10
11111111011111111111
11111111001111111111
11111111101111111111
11111111001111111111
11111111011111100001
11111111000010011111
11111001011111111111
11100111111111111111
10001111111111111111
01101111111111111111
10011111111111111111
6 6
010101001001
00100...

output:

NO MINIMAL CORRIDOR
7
29
NO MINIMAL CORRIDOR

result:

ok 4 lines

Test #8:

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

input:

2
125 125
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000...

output:

NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR

result:

ok 2 lines

Test #9:

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

input:

1
249 249
01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

745

result:

ok single line: '745'

Test #10:

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

input:

1
249 250
01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

746

result:

ok single line: '746'

Test #11:

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

input:

1
250 249
01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

746

result:

ok single line: '746'

Test #12:

score: 0
Accepted
time: 24ms
memory: 20660kb

input:

1
250 250
01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

748

result:

ok single line: '748'

Test #13:

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

input:

2
100 100
00100000101011101100100000001100011100100011000100010100010000000000101110100100001010111000101011011000101111111101011100110100001100001100100101100010001011110011110011110100001100001110011011001010
11110111011101110111111101110111011111110111011111111111111101110111011111110111111101110...

output:

7378
NO MINIMAL CORRIDOR

result:

ok 2 lines

Test #14:

score: 0
Accepted
time: 6ms
memory: 13032kb

input:

1
200 200
00100100000110001100010110101101000011100011001111010011000101111010111000011000010011011100110010010101100110010100000101001101001110100010011000100000101101001101111111010010110101010010001101010111010011110101100001000100000010010010000001110110101010110000100100111110101100000001010011...

output:

29753

result:

ok single line: '29753'

Test #15:

score: 0
Accepted
time: 6ms
memory: 10720kb

input:

1
200 200
11010011001011011100011000100111100001110000000110001100111010101011111110011001011011000101100010110110100100101110001101010111111000010010001100110100000110001110011001100110111101000111010101100111001000001110000110101101011000101110011111111000000011000111001100010101100001110111101001...

output:

NO MINIMAL CORRIDOR

result:

ok single line: 'NO MINIMAL CORRIDOR'

Test #16:

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

input:

1
240 240
10010001010111000111011011000100010110100111011011001111011011000110001001010110111101111000110110000101110011100101111100110110010100110111001011101001111100101101110101011101000111010010101010011110010101011010011000111011000011100010111011111000110001011001111000111010011000010110010000...

output:

42903

result:

ok single line: '42903'

Test #17:

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

input:

1
240 240
10100111110110011001001111000000011011101011001011001010101110101010111010000110001011111000001100010110111001001000000010101001111101111100101110100010011001110011011111001101010011000110101001011010001101111100110111101001101110000001011000001000111000101001101100110110101001001010010100...

output:

NO MINIMAL CORRIDOR

result:

ok single line: 'NO MINIMAL CORRIDOR'

Test #18:

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

input:

6
40 40
01000000000000000000000000000000000000000000000000000000000000000000000000000000
00100000000000000000000000000000000000000000000000000000000000000000000000000000
01000000000000000000000000000000000000000000000000000000000000000000000000000000
0010000000000000000000000000000000000000000000000...

output:

118
118
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR

result:

ok 6 lines

Test #19:

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

input:

9
27 27
000000000000000000000000000000000000000000000000000010
000000000000000000000000000000000000000000000000000100
000000000000000000000000000000000000000000000000000010
000000000000000000000000000000000000000000000000000100
000000000000000000000000000000000000000000000000000010
00000000000000000...

output:

79
79
79
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR
NO MINIMAL CORRIDOR

result:

ok 9 lines