easy nie
This commit is contained in:
parent
40a4785d66
commit
cdb6cccb89
13
74-240602-pass/main.py
Normal file
13
74-240602-pass/main.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
class Solution:
|
||||||
|
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
|
||||||
|
ind = len(matrix) - 1
|
||||||
|
for x, l in enumerate(matrix):
|
||||||
|
if l[0] < target: continue
|
||||||
|
if l[0] == target: return True
|
||||||
|
if x != 0: ind = x - 1
|
||||||
|
break
|
||||||
|
l = matrix[ind]
|
||||||
|
print(l)
|
||||||
|
if target in l:
|
||||||
|
return True
|
||||||
|
return False
|
Loading…
Reference in New Issue
Block a user