{"trustable":true,"sections":[{"title":"Description","value":{"format":"MD","content":"一矩形阵列由数字 $0$ 到 $9$ 组成,数字 $1$ 到 $9$ 代表细胞,细胞的定义为沿细胞数字上下左右若还是细胞数字则为同一细胞,求给定矩形阵列的细胞个数。"}},{"title":"Input","value":{"format":"MD","content":"第一行两个整数代表矩阵大小 $n$ 和 $m$。\n\n接下来 $n$ 行,每行一个长度为 $m$ 的只含字符 `0` 到 `9` 的字符串,代表这个 $n \\times m$ 的矩阵。\n"}},{"title":"Output","value":{"format":"MD","content":"一行一个整数代表细胞个数。"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4 10\n0234500067\n1034560500\n2045600671\n0000000089\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"MD","content":"#### 数据规模与约定\n\n对于 $100\\%$ 的数据,保证 $1 \\le n,m \\le 100$。"}}]}