''' 1.创建rows行cols列的全零矩阵 2.符合threshold条件的矩阵点变成1 3.原点变成2,把与2相邻的点变成2(搜索时2只会向上、向右传播) 4.输出2的个数 ''' class Solution: def movingCount(self , threshold: int, rows: int, cols: int) -> int: # write code here if rows > 79: rows = 79 if cols > 79: cols = 79 matrix1 = ...