bool searchMatrix(vector<vector<int>>& matrix, int target) {

```
auto start = lower_bound(matrix.begin(),matrix.end(),target,[](const vector<int> &e,const int t){
return e.back() < t;
});
return start != matrix.end() && binary_search(start->begin(),start->end(),target);
}
```

};