sort the array A and array B descending;
for(i=0;i<L(A);i++)
{
como=A[i]*B[i];
for(j=0;j<i;j++)
{
put A[i]*B[j] into the temporary array1;
put A[j]*B[i] into the temporary array1;
}
sort the array1 descending;
put the elements which is bigger than como into target array tarray;
put the como into the tarray;
the last two step must check the length of tarray , if it is equal to m ,then end program;
}
output the elements into the target array tarray.