摘要: 1 class Solution: 2 def backTrack(self,num,l,idx,n): 3 if idx >= n: 4 if len(l) >= 3: 5 return True 6 else: 7 return False 8 for i in range(idx,n): 9 阅读全文
posted @ 2020-04-07 21:49 Sempron2800+ 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1 class segTree: 2 def __init__(self,nums): 3 n = len(nums) 4 for i in range(1,31): 5 low,high = 2 ** (i-1),2 ** i 6 if n > low and n < high: 7 fillze 阅读全文
posted @ 2020-04-07 13:40 Sempron2800+ 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 1 class NumMatrix: 2 def __init__(self, matrix: 'List[List[int]]'): 3 self.matrix = matrix 4 m,n = 0,0 5 m = len(matrix) 6 if m > 0: 7 n = len(matrix[ 阅读全文
posted @ 2020-04-07 09:41 Sempron2800+ 阅读(149) 评论(0) 推荐(0) 编辑