#K68377. Symmetric Difference of Two Lists
Symmetric Difference of Two Lists
Symmetric Difference of Two Lists
Given two lists of integers, compute their symmetric difference defined as \(A \triangle B = (A \setminus B) \cup (B \setminus A)\). The symmetric difference contains all elements that are present in exactly one of the two lists.
Your task is to output the symmetric difference in ascending order with the numbers separated by a single space. If the symmetric difference is empty, simply output an empty line.
inputFormat
The input is provided via standard input and consists of two lines:
- The first line contains space-separated integers representing the first list.
- The second line contains space-separated integers representing the second list. This line may be empty.
outputFormat
Output the symmetric difference as a list of integers sorted in ascending order, with each number separated by a single space. If there are no elements in the symmetric difference, output an empty line.
## sample1 2 3
3 4 5
1 2 4 5