class Solution { public: vector<int> findElement(vector<vector<int> > mat, int n, int m, int x) { for (int i = n - 1, j = 0; i >= 0 && j < m; ) { if (mat[i][j] == x) { return {i, j}; } else if (mat[i][j] > x) { --i; } else { ++j; } } return {-1, -1}; } }; 思路:从左下角(或右下角)开始查找...