class Solution {
public:
bool searchArray(vector<vector<int>> array, int target) {
for(int i=0;i<array.size();i++)
{
int l=0,r=array[i].size()-1,mid;
int index=-1;
if(target>=array[i][0] && target<=array[i][array[i].size()-1])
{
while(l<r)
{
mid=l+r>>1;
if(array[i][mid]>=target) r=mid;
else l=mid+1;
}
if(array[i][l]==target) return true;
}
else continue;
}
return false;
}
};