摘要:
题目描述: 提交:二分 O(nlogk) class Solution: def minDays(self, bloomDay: List[int], m: int, k: int) -> int: minday = min(bloomDay) maxday = max(bloomDay) def 阅读全文
摘要:
方法:动态规划 class Solution: def minDistance(self, houses: List[int], k: int) -> int: houses.sort() n = len(houses) cost = [[0]*n for _ in range(n)] for i 阅读全文
摘要:
题目描述: 提交: class Solution: def finalPrices(self, prices: List[int]) -> List[int]: res = [] for i in range(len(prices)): for j in range(i,len(prices)): 阅读全文
摘要:
提交: class SubrectangleQueries: def __init__(self, rectangle: List[List[int]]): self.list = rectangle def updateSubrectangle(self, row1: int, col1: int 阅读全文