#‘. 【入门】有多少细胞

    Type: Default 1000ms 128MiB

【入门】有多少细胞

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

一矩形阵列由数字0到9组成,数字1到9代表细胞,细胞的定义为沿细胞数字上下左右若还是细胞数字则为同一细胞,求给定矩形阵列的细胞个数。(1<=m,n<=100)?

输入格式

整数m,n(m行,n列)

接下来m行,每行有n个0~9之间的整数

输出格式

细胞的个数

样例

4  10
0234500067
1034560500
2045600671
0000000089
4

第七届SWPU-ACM老生预选赛

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
187
Start at
2022-9-19 14:00
End at
2022-10-28 14:00
Duration
936 hour(s)
Host
Partic.
45