merge the two groups containing elements at indices x and y into one group
int uni ( int x , int y ) { int p = find ( x ) , q = find ( y ) ; if ( p != q ) { root [ p ] = root [ q ] ; } } void initialize ( int a [ ] , int n , Query q [ ] , int m ) {