注意判断数组是否为空!!!
bool Find(int target, vector<vector<int> > array)
{
if (array.empty())return false;
int rowCount = array.size();
for (int i = 0; i < rowCount; i++)
{
if (array[i].empty())continue;
int colCount = array[i].size();
if (target >= array[i][0] && target <= array[i][colCount - 1])
{
for (int j = 0; j < colCount; j++)
{
if (target == array[i][j])
return true;
}
}
}
return false;
}