Problem Difficulties solution codechef
You have prepared four problems. The difficulty levels of the problems arerespectively. A problem set comprises at least two problems and no two problems in a problem set should have the same difficulty level. Output the maximum number of problem sets you can create using the four problems.
- The first line of the input contains a single integer denoting the number of test cases. The description of test cases follows.
- The first and only line of each test case contains four space-separated integers , , , , difficulty levels of the four problems.
For each test case, output in a single line the maximum number of problem sets you can create using the four problems.
Subtask #1 (100 points): Original constraints
Sample Input 1
3 1 4 3 2 4 5 5 5 2 2 2 2
Sample Output 1
2 1 0
Test case: You can prepare the first problem set using the first two problems and the second problem set using the next two problems. So the problem sets will be and .
Test case: You can prepare one problem set using one problem having a difficulty level of and the other having a difficulty level of . There is no way to prepare more than one problem set.
Test case: There is no way to prepare a problem set.