bool Find(int target, vector<vector<int> > array) {
bool found = false; if(array[0].size()>0&&array.size()>0) { int row = 0; int column = array[0].size()-1; while(row<array.size()&&column>0) { if(array[row][column]==target) { found = true; break; } else if(array[row][column]>target) { --column; } else ++row; } } return found; }
提交时显示通过率23%,有点小bug,没改出来