void fid( a[] , i ) //传入一个数组与其长度
{
int left=0,right=i;
while(right-left>1)
{
if( mid < a[((left+right)/2)] )
right = ((left+right)/2);
if ( mid > a[((left+right)/2)] )
left = ((left+right)/2);
if ( mid == a[((left+right)/2)])
{
printf("%d\n",((left+right)/2));
break;
}
}
}