求细胞数量
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
提示
数据规模与约定
对于 的数据,保证 。
B班基础题单竞速2
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2024-8-7 8:03
- End at
- 2024-8-7 10:15
- Duration
- 2.2 hour(s)
- Host
- Partic.
- 13