n the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue.
For now, suppose you are a dominator ofm0sandn1srespectively. On the other hand, there is an array with strings consisting of only0sand1s.
Now your task is to find the maximum number of strings that you can form with givenm0sandn1s. Each0and1can be used at mostonce.
Note:
The given numbers of0sand1swill both not exceed100 The size of given string array won't exceed600.
m 个0 n个1 能组成数组里的最大数 Dp[i][j] = max(dp[i][j], dp[i -count0][j- count1] +1)