void swap(int *x, int *y)
{
*x^=*y^=*x^=*y;
}