#C6758. File Merge Operation
File Merge Operation
File Merge Operation
You are given T test cases. For each test case, you will be provided with two arrays. The first line of each test case contains two positive integers, N and M, representing the number of elements in the first and second arrays respectively. The next two lines contain N and M integers respectively.
Your task is to merge the two arrays and output the merged array in ascending order. The integers in each output line should be separated by a single space.
Note: The constraints are given as follows: \(1 \leq T \leq 200\), \(1 \leq N, M \leq 100\), and each integer lies in the range \(-1000 \leq x \leq 1000\).
inputFormat
The input is read from stdin and has the following format:
T N1 M1 a1 a2 ... aN1 b1 b2 ... bM1 N2 M2 ... (and so on for T test cases)
Where T is the number of test cases, and for each test case, N and M are provided followed by two lines containing the respective arrays.
outputFormat
For each test case, output a single line on stdout containing the merged and sorted array. The numbers should be separated by a single space.
## sample2
3 3
12 11 5
6 2 14
4 4
-1 0 1 0
3 -4 2 5
2 5 6 11 12 14
-4 -1 0 0 1 2 3 5
</p>