美文网首页
474. Ones and Zeroes

474. Ones and Zeroes

作者: 我是你的果果呀 | 来源:发表于2016-12-29 08:12 被阅读0次

    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)

    相关文章

      网友评论

          本文标题:474. Ones and Zeroes

          本文链接:https://www.haomeiwen.com/subject/xlpuvttx.html