int Findmax(int *a,int left ,int right){
if(left==right)
return a[left];//递归终止条件
int k=(left+right)/2;
int l=Findmax(a,left,k);
int r=Findmax(a,k+1,right);
return (l>r)?l:r;
}
int Findmin(int *a,int left,int right){
if(left==right)
return a[left];//递归终止条件
int k=(left+right)/2;
int l=Findmin(a,left,k);
int r=Findmin(a,k+1,right);
return (l<r)?l:r;
}