using System;
using System.Collections.Generic;
using System.Linq;
class Solution {
public bool Find (int target, List<List<int>> array) {
int row = array.Count();//行数
int col = array[0].Count();//列数
if(row==0)return false;
if(col==0)return false;
//注意很多人这里数组越界
if(target<array[0][0]||target>array[row-1][col-1])return false;
for(int i=0;i<row;i++)
{
for(int j=col-1;j>=0;j--)
{
if(target > array[i][j])break;
if(target == array[i][j])return true;
}
}
return false;
}
}</int>