{"trustable":false,"sections":[{"title":"Description","value":{"format":"MD","content":"现有一数字矩阵,该矩阵包含 $0$ ~ $9$,其中0为墙壁,其余数字为块,若块与块相邻(上下左右)那么它们为联通的,求给定数字矩阵中连通块的个数。"}},{"title":"Input","value":{"format":"MD","content":"第一行为两个整数 $n$ 、$m$,表示矩阵的长和宽。\n\n接下来 $n$ 行,每行一个长度为 $m$ 的字符串,表示 $n \\times m$ 的矩阵。\n"}},{"title":"Output","value":{"format":"MD","content":"一行一个整数代表连通块个数。"}},{"title":"Sample 1","value":{"format":"MD","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$。"}}]}