void Reverse(int R[],int low,int high)
{
int i;
for(i=0;i<(high-low+1)/2;i++)
swap(R[low+i],R[high-i]);
}
void Converse(int R[],int n,int p)
{
Reverse(R,0,p-1);
Reverse(R,p,n-1);
Reverse(R,0,n-1);
}
R=(a1,a2,....ap,b1,b2,....bn-p)=>(ap,....,a2,a1,bn-p,.....,b2,b1)=>(b1,b2,.....,bn-p,a1,a2,.....,ap)