题目:
题解:
class Solution:def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:m, n = len(matrix), len(matrix[0])x, y = 0, n - 1while x < m and y >= 0:if matrix[x][y] == target:return Trueif matrix[x][y] > target:y -= 1else:x += 1return False