import java.util.Scanner;
public class Matric{
public static void main(String[] arg)
{
Scanner in = new Scanner(System.in);
int[][] matric=null;
int a=0,b=0;
a= in.nextInt();
b= in.nextInt();
matric =new int[a][b];
for (int i=0;i<a;i++)
{
for(int j=0;j<b,j++)
{
matrix[i][j]=in.nextInt();
}
}
int target=in.nextInt(searchTrue(matrix,target));
}
private static boolean searchTrue(int [][] matrix,int target){
int row=matrix.length; //行
int col=matrix[0].length; //列
int i=0;
int j=col-1;
while(i<row && j>0){
if(matrix[i][j]>target){
j--;
}else if(matrix[i][j]<target)
i++;
else
return true;
}
return false;
}
}
n对夫妇n个男孩
生男孩概率和生女孩概率一致 50%
n/2个男孩第一胎 同时存在n/2个女孩是第一胎
n/2对生女孩的夫妇继续生,然后就会有n/4
以此类推 女孩数量就是:n/2+n/4+n/8.....=无限接近与n
n:n=1:1
P(x=1|c)=P(x=1 and c)/P(c)
# P(A|B)=P(AB)/P(B)
P(x=1 and c)=a/(b+a)*(1/2)^c
P(c)=b/(b+a) +a/(b+a)*(1/2)^c