comefrom: <doocs>0474.Ones and Zeroes_1.py
code: def findMaxForm( strs: List[str], m: int, n: int) -> int:
      dp = [[0] * (n + 1) for _ in range(m + 1)]
      t = [(s.count('0'), s.count('1')) for s in strs]
      for k in range(len(strs)):
          n0, n1 = t[k]
          for i in range(m, n0 - 1, -1):
              for j in range(n, n1 - 1, -1):
                  dp[i][j] = max(dp[i][j], dp[i - n0][j - n1] + 1)
      return dp[-1][-1]
masked: def sample_funcname ( var_0 : List [ str ] , var_1 : int , var_2 : int ) -> int :
      var_4 = [ [ 0 ] * ( var_2 + 1 ) for var_3 in range ( var_1 + 1 ) ]
      var_6 = [ ( var_5.count ( '0' ) , var_5.count ( '1' ) ) for var_5 in var_0 ]
      for var_7 in range ( len ( var_0 ) ) :
          var_8 , var_9 = var_6 [ var_7 ]
          for var_10 in range ( var_1 , var_8 - 1 , - 1 ) :
              for var_11 in range ( var_2 , var_9 - 1 , - 1 ) :
                  var_4 [ var_10 ] [ var_11 ] = max ( var_4 [ var_10 ] [ var_11 ] , var_4 [ var_10 - var_8 ] [ var_11 - var_9 ] + 1 )
      return var_4 [ - 1 ] [ - 1 ]
  