• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Uriel's Corner

            Research Associate @ Harvard University / Research Interests: Computer Vision, Biomedical Image Analysis, Machine Learning
            posts - 0, comments - 50, trackbacks - 0, articles - 594
            給出一個數列spells和一個數列potions,用spells里面每個數依次乘以potions里面每個數,輸出和spells等長的數列,每個值等于用spells里面每個數乘以potions每個數得到的length(potions)個數里面大于等于給定值success的數量
            先對potions按從小到大排序,然后對于spells里面每個數,二分第一個符合大于等于success的數的位置
            注意邊界值


             1 #2300
             2 #Runtime: 1082 ms (Beats 100%)
             3 #Memory: 37.5 MB (Beats 38.71%)
             4 
             5 class Solution(object):
             6     def successfulPairs(self, spells, potions, success):
             7         """
             8         :type spells: List[int]
             9         :type potions: List[int]
            10         :type success: int
            11         :rtype: List[int]
            12         """
            13         potions.sort()
            14         ans = []
            15         for sp in spells:
            16             ans.append(len(potions) - bisect_left(potions, ceil(1.0 * success / sp)))
            17         return ans
            99久久精品国产麻豆| 久久无码国产| 99久久无色码中文字幕| 人人狠狠综合久久亚洲88| 国产精品久久精品| 99久久国产亚洲综合精品| 91精品国产综合久久精品| 青青草国产精品久久| 精品国产乱码久久久久久呢| 久久精品嫩草影院| 国产成年无码久久久免费| 精品久久久久一区二区三区| 色诱久久久久综合网ywww| 精品无码久久久久久久久久| 久久久精品人妻一区二区三区蜜桃 | 亚洲精品无码久久一线| 99久久成人18免费网站| 久久精品国产久精国产思思| 天堂无码久久综合东京热| 久久福利青草精品资源站免费| 久久久这里有精品| 欧美日韩精品久久久久| 欧美一区二区精品久久| 成人资源影音先锋久久资源网| 精品久久人人爽天天玩人人妻| 亚洲成av人片不卡无码久久 | 久久人人爽人人爽人人av东京热| 99久久精品免费观看国产| 国产精品久久自在自线观看| 亚洲精品国精品久久99热一 | 久久美女网站免费| 久久精品人人做人人爽97| 久久人爽人人爽人人片AV | 久久亚洲高清观看| 国产亚洲美女精品久久久久狼| 久久精品九九亚洲精品| 国产精品禁18久久久夂久| 77777亚洲午夜久久多喷| 久久99精品久久久久久| AA级片免费看视频久久| 久久男人AV资源网站|