The solution is this:
The first step: sort array A and array B from small to large.The second step: for each of the i (i>=0&&i<=N-1),if i is odd, the C[i]=A[i]+B[i];Otherwise the C[i]=A[i]-B[i]
Step 3: output array CInput an integer N in the first line of each set of test data,
Input N Numbers in the second line, said array A
Input N Numbers in the third line, said array B
3
3 1 2
5 6 4
3
1 2 3
4 5 6
5 -3 9
5 -3 9