• <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
            www亚洲欲色成人久久精品| 亚洲综合熟女久久久30p| 99久久精品久久久久久清纯| 色综合久久天天综合| 亚州日韩精品专区久久久| 蜜臀av性久久久久蜜臀aⅴ| 国产精品gz久久久| 伊人伊成久久人综合网777| 久久美女人爽女人爽| 精品综合久久久久久97| 91精品国产9l久久久久| 久久婷婷五月综合色99啪ak| 久久精品国产亚洲AV电影| 久久午夜综合久久| 久久777国产线看观看精品| 欧美精品乱码99久久蜜桃| 欧美激情精品久久久久| 伊人久久久AV老熟妇色| 久久精品三级视频| 亚洲国产成人久久综合一| 久久精品亚洲日本波多野结衣| 伊人久久成人成综合网222| 久久99精品九九九久久婷婷| 久久九九青青国产精品| 久久精品中文无码资源站| 久久人人青草97香蕉| 九九热久久免费视频| 精品国产综合区久久久久久| 丰满少妇人妻久久久久久| 精品国产乱码久久久久软件| 四虎亚洲国产成人久久精品| 精品无码人妻久久久久久| 久久精品国产亚洲一区二区三区| 国产亚洲精久久久久久无码| 久久99精品久久只有精品 | 99久久99久久精品国产片| 久久天天躁狠狠躁夜夜网站| 精品人妻久久久久久888| 国产精品一久久香蕉国产线看观看| 久久综合久久自在自线精品自 | 精品久久久久中文字|