求细胞数量
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
的字符串,代表这个 的矩阵。
输出格式
一行一个整数代表细胞个数。
4 10
0234500067
1034560500
2045600671
0000000089
4
提示
数据规模与约定
对于 的数据,保证 。
C23天河寒假作业2-基础数据结构
- Status
- Done
- Problem
- 14
- Open Since
- 2024-1-30 0:00
- Deadline
- 2024-3-31 23:59
- Extension
- 24 hour(s)