class Solution {
public:
bool Find(int target, vector<vector<int> > array) {
int row = array.size();
int column = array[0].size();
int i = 0;
int j = column - 1;
if (!array.empty()) {
while (j >= 0 && i < row) {
if (array[i][j] > target) {
j--;
}
else if (array[i][j] < target)
i++;
else
return true;
}
}
return false;
}
};