AI. 【例65.3】 细胞个数

    Type: RemoteJudge 1000ms 64MiB

【例65.3】 细胞个数

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.

说明

一矩形阵列由数字0099组成,数字1199代表细胞,细胞的定义为沿细胞数字上下左右还是细胞数字则为同一细胞,求给定矩形阵列的细胞个数。如:
阵列。

4 10
0234500067
1034560500
2045600671
0000000089

有$4$个细胞。

输入格式

第一行为矩阵的行nn1n1001≤n≤100),列mm1m1001≤m≤100)。
下面为一个n×mn \times m的矩阵。

输出格式

细胞个数。

样例

4 10
0234500067
1034560500
2045600671
0000000089
4

2025年夏令营新人班【查】6

Not Claimed
Status
Done
Problem
86
Open Since
2025-7-12 0:00
Deadline
2025-8-23 23:59
Extension
24 hour(s)