#C14789. Merge and Sort Odd Numbers
Merge and Sort Odd Numbers
Merge and Sort Odd Numbers
In this problem, you are given two lists of integers. Your task is to merge these two lists, filter out the even numbers, and then sort the remaining odd numbers in ascending order. A number is considered odd if it satisfies the condition . If there are no odd numbers, print an empty line. The input is provided via stdin and the output should be printed to stdout.
inputFormat
The input is provided via standard input (stdin) in the following format:
1. The first line contains an integer , representing the number of elements in the first list.
2. The second line contains space-separated integers, representing the first list.
3. The third line contains an integer , representing the number of elements in the second list.
4. The fourth line contains space-separated integers, representing the second list.
outputFormat
Output the odd numbers from the merged list in ascending order, separated by a space. If there are no odd numbers, output an empty line.## sample
3
10 3 5
3
6 7 1
1 3 5 7