Type: Default 1000ms 256MiB

细胞

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代表细胞,细胞的定义为沿细胞数字上下左右还是细胞数字则为同一细胞,求给定矩形阵列的细胞个数。如:

阵列

4 10
0234500067
1034560500
2045600671
0000000089

有4个细胞。

【输入】

第一行为矩阵的行n和列m;

下面为一个n×m的矩阵。

【输出】

细胞个数。

4 10
0234500067
1034560500
2045600671
0000000089
4

周六广度优先搜索

Not Claimed
Status
Done
Problem
7
Open Since
2025-4-26 0:00
Deadline
2025-5-31 23:59
Extension
24 hour(s)