Given two integer arrays nums1 and nums2, output a list of their intersection. Each element in the result must be unique and listed in ascending order. Note that if their intersection is an empty set, the resulting list should be an empty list []
.
Input Specification
The first line of the input gives the number of test cases, , and then test cases follow.
For each test case, it will consist of two lines, where the first line contains integers separated by spaces, and the second line contains integers separated by spaces.
Constraints
Output Specification
For each test case, output one line containing Case #x: y
, where is the case number(starting from 1), and is the intersection list of the given input lists. Note that the elements in the intersection list should be in ascending order.
Sample Input
2
1 2 2 1
2 2
4 9 5
9 4 9 8 4
Sample Output
Case #1: [2]
Case #2: [4, 9]
Hint
set
sort
Comments