int the_permutation[64];
void random64() {
int i,j,temp;
for (i = 0; i < 64; i++) {
the_permutation[i] = i;
}
for (i = 0; i<64; i++) {
j = rand()%64;
temp = the_permutation[j];
the_permutation[j] = the_permutation[i];
the_permutation[i] = temp;
}
return ;
}
void bubble(int *array, int m){
int c, d, swap;
for (c = 0 ; c < ( m - 1 ); c++) {
for (d = 0 ; d < m - c - 1; d++) {
if (array[d] > array[d+1]) {
swap = array[d];
array[d] = array[d+1];
array[d+1] = swap;
}
}
}
}
void shuffle(int *a0, int *a1,int *ans,int n){
int c,c0=0,c1=0;
for (c = 0 ; c < 2*n; c++) {
if (c0==n) {
ans[c]=a1[c1++];
continue;
}
if (c1==n) {
ans[c]=a0[c0++];
continue;
}
if (a0[c0]<a1[c1]) {
ans[c]=a0[c0++];
} else {
ans[c]=a1[c1++];
}
}
return ;
}