摘要:
题目描述: 提价: class Solution: def maxArea(self, h: int, w: int, horizontalCuts: List[int], verticalCuts: List[int]) -> int: horizontalCuts.sort() vertical 阅读全文
摘要:
题目描述: 提交: class Solution: def minReorder(self, n: int, connections: List[List[int]]) -> int: connect = collections.defaultdict(set) c_set = set(tuple( 阅读全文
摘要:
题目描述: 提交: class Solution: def hasAllCodes(self, s: str, k: int) -> bool: k_list = set() if k > len(s): return False for i in range(len(s) - k + 1): if 阅读全文
摘要:
题目描述: 方法:动态规划 自底向上: class Solution: def cherryPickup(self, A): R, C=len(A), len(A[0]) from functools import lru_cache @lru_cache(None) def dp(r,c1,c2) 阅读全文
摘要:
题目描述: 提交:超时 class Solution: def checkIfPrerequisite(self, n: int, prerequisites: List[List[int]], queries: List[List[int]]) -> List[bool]: dic = colle 阅读全文