QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#149298#4190. Grid DeliveryGuanYunchangAC ✓283ms7824kbC++20670b2023-08-24 13:03:002023-08-24 13:03:02

詳細信息

Test #1:

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

input:

4 4
__C_
C_C_
_C_C
_CCC

output:

2

result:

ok single line: '2'

Test #2:

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

input:

4 6
CC____
_CCC__
___C_C
C__CCC

output:

2

result:

ok single line: '2'

Test #3:

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

input:

3 5
CC__C
_C_CC
CCCCC

output:

3

result:

ok single line: '3'

Test #4:

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

input:

4 4
__C_
CCCC
___C
_C_C

output:

2

result:

ok single line: '2'

Test #5:

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

input:

1 1
_

output:

0

result:

ok single line: '0'

Test #6:

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

input:

1 1
C

output:

1

result:

ok single line: '1'

Test #7:

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

input:

10 10
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________

output:

0

result:

ok single line: '0'

Test #8:

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

input:

10 10
_________C
_________C
_C__C_____
__________
____C_____
_________C
_______C__
__________
______C___
_______C__

output:

3

result:

ok single line: '3'

Test #9:

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

input:

10 10
C_C__C____
___C__C_CC
_CCC___C__
__C_CCC__C
__C_____CC
_CCCCC_CCC
C_C_CC_CCC
____C_C___
CC____CCCC
C___C___C_

output:

7

result:

ok single line: '7'

Test #10:

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

input:

10 10
CCCCCCCCCC
CCC_CC__CC
CCCCCC_CCC
_CCCCCC_CC
CCCCCCCCCC
C__CCCCCCC
CCCCCCCC_C
C_CCCCCCCC
_CCCCCCCCC
CCCCCCCCCC

output:

10

result:

ok single line: '10'

Test #11:

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

input:

10 10
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCC_
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC

output:

10

result:

ok single line: '10'

Test #12:

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

input:

100 100
____________________________________________________________________________________________________
____________________________________________________________________________________________________
__________________________________________________________________________________________...

output:

0

result:

ok single line: '0'

Test #13:

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

input:

100 100
__C_____________________C__________________C____C____________________________C______________________
______________C__________C__C_C____C___CC___C_C_C__________C_____C____C____C________________CC____C_
____C____________C_____________C_____C_C_________C____________________C_______C___________...

output:

44

result:

ok single line: '44'

Test #14:

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

input:

100 100
C_C_CCCC_C_CCC__C_CC_CC_C____CCC__CCCC__CCC_C__CC_CC_CCC__C___CCC_CCCC_CCC_________CCCCCCC_CC____C_C
CC_C__CCC_CCC_CC_____CCC___C_CC____C_C__CC_C___C_CC___CCCC_C_C________C___C___CC_CC__CCC________C___
___C_C_CC___CCC_______C_C___CCC_C_____C__CC_____CC_____C__CCC_C__CC_C_C_C_CC_C__C__C__C_CC...

output:

81

result:

ok single line: '81'

Test #15:

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

input:

100 100
CCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC__CCCCCCCCC_CCCCCCCCCC_CCC_CCC_CCCCCCCCCCCCCCC_CCC_CCCC_CCCCCC
CCCCCCCCCCCC_CCCCCCCCCCCCCCC_CCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCC__C__CCCCC_C__CCCCCCCC_CCC_CCCCCC_CCCC
CCCCCCCCCCCCCCCC_CCC_CCC_CCCCCCC_CCCCC_CCCCC_CCCCC__CCCCCCCCCCCCCCCCCCCCCCCCC_CCCC_CC_CCCC...

output:

95

result:

ok single line: '95'

Test #16:

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

input:

100 100
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...

output:

100

result:

ok single line: '100'

Test #17:

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

input:

2000 2000
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________...

output:

0

result:

ok single line: '0'

Test #18:

score: 0
Accepted
time: 52ms
memory: 7544kb

input:

2000 2000
___________CC________C__________C___C________C______C____________________________C___________C____C______C_C__________CC___C________________________________C____C_______________C___C__________C_C_______C_______C____C_C________C__C______________________C________C________________C________C__...

output:

945

result:

ok single line: '945'

Test #19:

score: 0
Accepted
time: 204ms
memory: 7732kb

input:

2000 2000
C_CC_____C_C_C_CC__C_C_CC_CCCCC___CC_CCC_CC__C____CCCC__CCC_C_CCC__CC__CC___CCC____C____C__CCC___CC_CCC___CCC___CC_C_C__C_C_CC__CC_C__C___C_C_CC__CC_CC___CC_CCCC__CCCC_C________C_C_C_C__C_C__C_____C__C_CCCCCC_CCCCC_CC__CCC_CCC__C______C_C_C_CC__CC___C__CCC__CC__CC___C__C_CC_C_C__CC_CCCC__C...

output:

1641

result:

ok single line: '1641'

Test #20:

score: 0
Accepted
time: 283ms
memory: 7760kb

input:

2000 2000
CC_CCCCCCCCC_CCCCCCCCCC__C_CCCCCCCCCCCCCCC_CCCCCCCCC__C_CCCC_CCCC_CCCCCCC_CCC_CCCCCC_C_C__CCCC___CCCCCCCC_CCCC_CC__CCC_CCC_CC_C_CCCCC_CCCCCCCC__CCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCC_CCCCCCCCC_CCCC__CCCCCCC_CCCCCC__CCCCCCCCCC_CCCCCCCCCC_CCCCCCCCCCCCCCCCCC_CCC_CCCCCCCCCCC_CCCCCCC...

output:

1938

result:

ok single line: '1938'

Test #21:

score: 0
Accepted
time: 282ms
memory: 7824kb

input:

2000 2000
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCC...

output:

1993

result:

ok single line: '1993'

Test #22:

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

input:

2000 1
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_...

output:

0

result:

ok single line: '0'

Test #23:

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

input:

2000 1
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
_
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
_
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
_
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C...

output:

1

result:

ok single line: '1'

Test #24:

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

input:

2000 10
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
__________
______...

output:

0

result:

ok single line: '0'

Test #25:

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

input:

2000 10
__________
_C___C____
__________
__________
______C_C_
_______C__
__________
C_______C_
__________
__________
___C______
C__C______
_______C__
C___C_____
_C__C_____
_________C
__________
_______C__
__________
__________
__________
__C_______
__________
__________
C_________
__________
_____C...

output:

10

result:

ok single line: '10'

Test #26:

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

input:

2000 10
C__C_C_CC_
____CC_C_C
CCCC_C__CC
_CC__CC_CC
_CC__CCC_C
C_C___CC__
C________C
CC_C__C__C
__C_CCCCCC
__CCC_C__C
C_CC__CC_C
CC_CCC__C_
CCCCCC_C__
CCC_______
____CCC__C
______CCCC
CCC_CCC__C
C___CC_C_C
_C_CCCC__C
CC_CCCCC__
C_____C_C_
_C_CC_C_CC
C_C___CC__
CCCC__CC__
CC__CC_C_C
_C___CCC__
___CC_...

output:

10

result:

ok single line: '10'

Test #27:

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

input:

2000 10
CCCCCCCCCC
_CC___CCCC
CCCCCCCCCC
CCCC_C_CCC
_CCCCCCCCC
_CCCCCCCC_
CCCCCCCCCC
CCCCCCC_CC
_CCC_CCCCC
C_C_CCCCCC
CCCC_CCC__
CCCCCCCCC_
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCC_CCCC
_CCCCCCCCC
_CCCCCCCCC
CCCCCCCCCC
CCCCCCC_CC
CCCCCCCCCC
CCCC_CC_CC
CCCCCCCCCC
C_C_CCC_CC
C_CCCCCCCC
CCCCCCCCCC
CCCCCC...

output:

10

result:

ok single line: '10'

Test #28:

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

input:

2000 10
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CC_CCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCC_C
CCCC_CCCCC
CCCCCCCCCC
CCCCCC_CCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCCCCCC
CCCCCC...

output:

10

result:

ok single line: '10'

Test #29:

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

input:

2000 100
____________________________________________________________________________________________________
____________________________________________________________________________________________________
_________________________________________________________________________________________...

output:

0

result:

ok single line: '0'

Test #30:

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

input:

2000 100
____________C____________________________________________C______________________C____C______________
_C______________CCC_____C______C__________________C______C___CCC_______CC_C________________C_C_C____
C_____________C_________C_C_____C_C___________________C_______________________________CC_...

output:

100

result:

ok single line: '100'

Test #31:

score: 0
Accepted
time: 11ms
memory: 4084kb

input:

2000 100
___C_CCC_CCCCC_CC_CC__C__C__CCC_CCCC_CCC__C_C__C__C_CCCCCC_C__C_C_C____CC___CC__C_CC_C_CCCCC__CCC___
_CC_CC_CCCC__C_________C__C__C_CCC_C__CC___CC_C_C_C_CCCC____C_CCC_CCC_C____C____CC_CC__C____C_CCC___
C_C__C__CCCCCC___C_C_CC_C_C_CC_CC_C__CC__C__C___CC_CCCC___CC__CCC__CCC_______CCC___CC__C_...

output:

100

result:

ok single line: '100'

Test #32:

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

input:

2000 100
CCC_CCCCCC_CCC_CCC_CCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCC_C__CCCCCCCCCCCCCCCC_CCCC_CCCCCCCC__CC_C_CCC
CCCCCCCCCCCCCCCCCCC_CCCCCC_CCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCC_CCCCCCC_CCCCCC_CCCCCCCCCCCCCCCC_CCC
CCCCC_CCCCCCCC_C_CCCC_CCCC_CCCCCCC_CCCCCCCCCCC_CCCC_CCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCC...

output:

100

result:

ok single line: '100'

Test #33:

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

input:

2000 100
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...

output:

100

result:

ok single line: '100'

Test #34:

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

input:

1 2000
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________...

output:

0

result:

ok single line: '0'

Test #35:

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

input:

1 2000
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...

output:

1

result:

ok single line: '1'

Test #36:

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

input:

10 2000
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________...

output:

0

result:

ok single line: '0'

Test #37:

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

input:

10 2000
_CC___________C_________________________________C__________________________________C_____________________________________________________C_C_C_____C__________C_C___C_____________________________C________________________________C_C_________________C___CC___C__C________C_______C_C________C____...

output:

10

result:

ok single line: '10'

Test #38:

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

input:

10 2000
_CCCC____CCC___C_CCC__CCC__CC___CC_CCCCCC_C_C_____CC_CCC_CCCCC_C_C_CCCCC___C___C_CCCCC__C__C_C_C__CC_CCC___C___C___CCC__C_C_C_C_CCCCC______CC____CCCCC__C_C_CCCCCC_C__C_CCC_C_C_C_C_CCC_CC__________CC_C___CC__CC__CCC__C___CC____CCCCC_C__CC__CC_CCCCC_____CC_CC____C__CCC_C__CCCC__CC___C__C_CCCCC...

output:

10

result:

ok single line: '10'

Test #39:

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

input:

10 2000
CCCCCCCCCCCCCCCCCCCCCCCC_CCC_CCCC__CCC_C_CCCCCCCCCCCCCCCC_CCCCCCCC_CCCCCCC_CCCCCCC_CCCCCCCC_CC_CCCCCC_CCCCCCCC__CCCCCCCCCCCCCCCCCC_CCC_CCCCCCCCCCC_CCC___CCCC_CCC_CCCCCCCCC_CCCCCC_CCCCCC_C__CCCCCCCCCCCCC_CC_CCCCCCCCCC__CCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCC...

output:

10

result:

ok single line: '10'

Test #40:

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

input:

10 2000
CCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC__CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...

output:

10

result:

ok single line: '10'

Test #41:

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

input:

100 2000
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________...

output:

0

result:

ok single line: '0'

Test #42:

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

input:

100 2000
____________________________C____C__C___C________C_______________________________C________________C__C_______C_________C______C_______________________CCC__C____CC_C___C_________________________CC_________C__________CC_____C_C______CC__________C_C___C_____C_______________________C__________C...

output:

100

result:

ok single line: '100'

Test #43:

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

input:

100 2000
_CCC___CC___CC_C__C___C_C_C__C__CC_CCCC__CCC_C_C___CCCCCC_C__C_C__CC______CCCC_CCCCCCCCCC___C__CC__C_C_C__C_CC___C_C_CCC___C__CC_____C_CC____CC__C__C___C___C_C_CC___C_____C___CCC_C_C___CCC_CCCCCC_CC_CC_C_CCCC_C_CC___C_______C_CC____CC_C___CC_C__C___CCC_C_C__C___CCCCC_C_CC___CCC_CC_C____C_CC...

output:

100

result:

ok single line: '100'

Test #44:

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

input:

100 2000
CCCCC_CCCCC_CCCCCCCCCCCCCCCCC_CCCCCC_CCCCCCCCCCCCC_CCCCCC_C__C____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CC_C_CCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_C_CCCCCCCCCCCCC_CCCCC__C_CCCCCCCCCCCCCCCCCCCCCC_CCCCCC___CCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCC_...

output:

100

result:

ok single line: '100'

Test #45:

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

input:

100 2000
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...

output:

100

result:

ok single line: '100'

Test #46:

score: 0
Accepted
time: 203ms
memory: 7148kb

input:

1784 1890
_CCCCC__C_C_C_CC_CC_CCC_C_C_CCC___C_C___CCCCCC_CCCCCCCC_CCC_CCCCC_C__CCC_CCC_C__C__C_C_C_CC__C__C_CCCCCCCCC__C___C__CCC_CCC_C_C__C__CCCC_CCC_CC_CCCC__CCC_C_CC__CCCCC__C_CCC___C_CC__CCC_C_CCC_C_C_CC_____CC_CC__CC_CC_CC_CC_C__CC__CCCCC_C_CCC_CCC_C_C_CC__CCC_CCCC_CCCCC_CCCCC_CC_CCCCC_CCCC___C...

output:

1651

result:

ok single line: '1651'

Test #47:

score: 0
Accepted
time: 80ms
memory: 5012kb

input:

1147 938
CCC__CCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCC_CCCCCC_CCCCC_CCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCC_CCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCC_CCCCCCCCCCC_C_CCCCCCCCCC_CCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...

output:

938

result:

ok single line: '938'

Test #48:

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

input:

73 1588
CCCCCC_CCCCCC_CCCCCCCCCCCCCC_CCCCCCCCCCCC_CC_CC_CCC__C_CC_CCC_CCCCCCCCCCC_CCCCCC_CC_C_CCCCCCCCCCC__CC_CCCC__CCC_CCCCCCCCCCCCC_CCC__CCCCCC_CCCC_CC__CCCCCCCCCC_CCCCCC_C_CC_CC_C_CCCCC_CCCC_CCCC___C_CCC_CCCCCCCCCC_CCCCCCCCCCCCCCCC_CCCCCCCCCC_CCCC_CCCC_CCC_CCCCCCCC_CCCC_CCC_C___C_C_CCC_CCC_CCC_CC...

output:

73

result:

ok single line: '73'

Test #49:

score: 0
Accepted
time: 112ms
memory: 4916kb

input:

1852 642
CCCCCCCCCCCC_CCCC_C_C_CCCCCCCCCCC_C_CCCCCCCCCCCCCC_CCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCC_CCC_C_CCCCCCCCCCCCCCCCCCCCCCCCCCCCC__CCCCCCCCCCCCCCCCCC_CCCCC_CCCCCCCCCCCCCCCCCCCCC_CCCCCC_C_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCC_CCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCC_CCCCCCCCCC_...

output:

642

result:

ok single line: '642'

Test #50:

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

input:

751 813
_C__CC__C_C____C_CCC___C_C___CC____CC__C___C_CC_____C____CC___C______C_____C_____C_________C____________C___C___C_C_C_______C______________C_______C_C____________C_______C__C_C_CCC_____C___CC____C_C___________CCCCC___C______CCCCC_____________C_________________C____C___C____CCC_C_C____C___C__...

output:

500

result:

ok single line: '500'

Test #51:

score: 0
Accepted
time: 26ms
memory: 4232kb

input:

865 638
_C__CC___C____C__C____CCC_C__C_C__C__C_CCCC_C__C___C_CCC______CC___CCC_CC__CC__C__C__C_C__CC_CC___CCC_____C__C___C____C___CC__CC___C__CCCCCCC___C____C__C_CC___C____C_C__C_C_C_CCCC__CC__C__C________C__C____CCC_C__C_____C_C_CC_CC_C_C_C_C____CCCC___CCCCC__CC___C__C_C____CC__CC__C_C_CC__C__C__C_...

output:

573

result:

ok single line: '573'

Test #52:

score: 0
Accepted
time: 51ms
memory: 4948kb

input:

1853 681
___C__C_____C__C__C___CC__C_CC___CC_C__C___C_C_______C___________C_______C__C__CC__CCCC_C________CC___C_C_____CC_CC_C_C_CCCCCCC__C__C___CC______CC_C____C__CC______CC_____C_____C____C_C_CC_CC_C_C________C_C_CCC__C___CCCC_C_C__C_CCC__CC__C___CCC__C__C_C__C_C_C______CC___C__CC_C___CC__CC_CC_C_...

output:

675

result:

ok single line: '675'

Test #53:

score: 0
Accepted
time: 122ms
memory: 5052kb

input:

1734 764
CCCCCCCCCCCCCCCCCC_CCCC_C_CCCC_CCCCCCCCCCCCC__CCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCC__CC_CCCCCCCCCCCC_CCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCC_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC_CCCCCCCCCC_CCCCCCCC...

output:

764

result:

ok single line: '764'

Test #54:

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

input:

256 112
_________C_C____CCCC_C_CC__C__CCC__CC_____C_CC_C____C___________C__CC___C______CC___C__C______CCC___C____C______
C__CCCC__C__CC___________C_C_C_C______C__C__C__CC____C________C________C___C_C___C___CC__C_C_CC_C__C__C___C__CCC
__C_C____CC____C___C____C___CC____C___________C___C__C____C___CC__...

output:

104

result:

ok single line: '104'

Test #55:

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

input:

4 382
____C_C_C__CCCC_C__CC__C____CC__C_CCCC___C_____CC____CC_C_CC___CC__CCC___C___CCC_CC__CCCCCC_CC____CCCC___C_CCC___C_____C________C__CCC__CC_CC_CC_C_CC______CCCCCCC____CC__C__CC_CCCC__C__C__C____C__________CC___CC__CCCC__C___CC__C_______C_CCCCCCC__CC___CC_CC_C_C_CCC___C__C_C____C_CCCCC___CC___C_...

output:

4

result:

ok single line: '4'

Test #56:

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

input:

649 33
_C_____CCCCC____C_C__C___CC__C__C
_C______C_CC__C__C______CCC______
C___________CC_C__C_C__C_CC_CCCCC
__C__C_CC__CCCC__C_C__C____C__C_C
__C__C___CCC____C___CCC_C_______C
_C___C_CCC_C__CC_C__________C__C_
___C______________C___________CCC
___C_CC___C___C__C_CC__C____C__C_
C__C_CC___CCC__C____C...

output:

33

result:

ok single line: '33'

Test #57:

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

input:

25 717
CCCC__CC_C_C__C_CC__C_____CCC_CC_C___C__C__C_CC__________C____CCCCC______CC____C____C____C_____C________C_____________C_____C__C___________C__C____CC_______CC__CC_____C_CCCC_C_C____C__CC_C___CC_C_____C_____C_C_______CC_C_C__C____C__________CCC____CC__________C__C_______________C______CC______...

output:

25

result:

ok single line: '25'

Test #58:

score: 0
Accepted
time: 43ms
memory: 4560kb

input:

947 699
CCC__C_CCCCCC_C___C_C_CCC_CCCC_C_C_CCCCCC_C_CCC_CC__CC_CCCCCCCCCC_C_CCCCCC_CCCCCCCCC_CCC_CC_CCC___CCC___CCCC_C_CC_CC__CCC_CC__C__CC_C_CC__C_C_C___CCCCC_C__CC__CCCC_CCC_CCC_CCCCC_C_C__C_CCCCCCCCC_CCC_CCCCC__CC_____CCCCCCCC__C_C__CCC_C_C_CCC__CCCC_C__C_CC_CCCCCC__C_C_C_CCC_C_CCCC____C_CC_C_C_C...

output:

690

result:

ok single line: '690'

Test #59:

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

input:

240 1087
___C___C_CCC____C____CC___C__C_C_______CC_______________C_CC______C________C__C_C___C____C__C__C__C___CCC__CC__CC_C__C_C____C______C__C___C_C_C_CC____C_______C__CC_C_C___CC_CCCC__C_C_C____CC____C_____C__CCC___C_C_____C_CC______C___C_C__C_CC__________CCC___C___C___C__C___C___CC_____CC_____C_...

output:

240

result:

ok single line: '240'

Test #60:

score: 0
Accepted
time: 99ms
memory: 5320kb

input:

1485 1338
C____CC__CC____C___CC_CC__CCCC____C_C__C_CC__CC__C_C__CCC_CCC_CC_C_CCCC____C________C__C___CCCCCCC__CC__C_C_C_CC_CCCCCC_CC_CCC_C____CCCCCCC__C_C_CC_CC______CC__C_C__C_CC_C_CC_C_C___C_CC__C__CCCC______C_C___CC________C_CCCCCC_CC_____CCCC_CCCCC_C_CCC_CC_CC____C__CCC___C___CCCC__C_C_C___CC__C...

output:

1138

result:

ok single line: '1138'

Test #61:

score: 0
Accepted
time: 57ms
memory: 7584kb

input:

2000 2000
_CCC_C_____C_CC_C__CCCCC_CC__C_CCCC__C_C___C___C__C_CC_CC_C___CCC_CCCC___C_CC_____C_C__CCCC___C___CCC_CCC_C_CCCCCCC_C__CC_CCCCC_______CCC_CC__C_C____CC_C_CCC_CC_CC__CC__C_C___CCC____CCC_C___C__C_CCC_C_CCCCCC__C___C___CC_CCC___CCCC_CC_CCC__C_C__C__CCC_C___C_C___CC_CC___CCCCC_CC_C_C___C_CCCC...

output:

1000

result:

ok single line: '1000'