comefrom: <doocs>0221.Maximal Square_1.py
code: def maximalSquare( matrix: List[List[str]]) -> int:
      m, n = len(matrix), len(matrix[0])
      dp = [[0] * (n + 1) for _ in range(m + 1)]
      mx = 0
      for i in range(m):
          for j in range(n):
              if matrix[i][j] == '1':
                  dp[i + 1][j + 1] = min(dp[i][j + 1], dp[i + 1][j], dp[i][j]) + 1
                  mx = max(mx, dp[i + 1][j + 1])
      return mx * mx
masked: def sample_funcname ( var_0 : List [ List [ str ] ] ) -> int :
      var_5 , var_7 = len ( var_0 ) , len ( var_0 [ 0 ] )
      var_11 = [ [ 0 ] * ( var_7 + 1 ) for var_9 in range ( var_5 + 1 ) ]
      var_12 = 0
      for var_13 in range ( var_5 ) :
          for var_14 in range ( var_7 ) :
              if var_0 [ var_13 ] [ var_14 ] == '1' :
                  var_11 [ var_13 + 1 ] [ var_14 + 1 ] = min ( var_11 [ var_13 ] [ var_14 + 1 ] , var_11 [ var_13 + 1 ] [ var_14 ] , var_11 [ var_13 ] [ var_14 ] ) + 1
                  var_12 = max ( var_12 , var_11 [ var_13 + 1 ] [ var_14 + 1 ] )
      return var_12 * var_12
  