class Solution {
public:
bool searchArray(vector[HTML_REMOVED]> array, int target) {
if(array.size()==0||array[0].size()==0)return false;
int i=0,j=array[0].size()-1;
while(i[HTML_REMOVED]=0){
int x=array[i][j];
if(x==target)return true;
else if(x>target)j–;
else i++;
}
return false;
}
};