Alice has candies, where the th candy is of type . Alice noticed that she started to gain weight, so she visited a doctor.
The doctor advised Alice to only eat of the candies she has ( is always even). Alice likes her candies very much, and she wants to eat the maximum number of different types of candies while still following the doctor's advice.
Given an integer array of length , return the maximum number of different types of candies she can eat if she only eats of them.
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 one line which contains integers separated by spaces, where the th integer represents the candy type of th candy.
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 maximum number of different type of candies Alice can eat if she only eats of them.
Sample Input
2
1 1 2 2 3 3
6 6 6 6
Sample Output
Case #1: 3
Case #2: 1
Hint
set
min/max
Reference
https://leetcode.com/problems/distribute-candies/description/
Comments