int binary_search(const unsigned *a, int n, unsigned x)
{
int l=0,r=n-1,mid=0,Block=8;
while(r-l>=Block)
{
mid=l+(r-l>>1);
(a[mid]<x)?l=mid+1:r=mid;
}
return a[l]==x?l:a[l+1]==x?l+1:a[l+2]==x?l+2:a[l+3]==x?l+3:a[l+4]==x?l+4:a[l+5]==x?l+5:a[l+6]==x?l+6:a[l+7]==x?l+7:a[l+8]==x?l+8;
}