Subscribe & Like (It encourages me)
Site - https://www.codeflu.com
Code link - https://codeflu.com/codechef/problem-...
Telegram - https://t.me/codeflu [ JOIN US FOR MORE ]
Challenge link - https://www.codechef.com/AUG21C/probl...
Problem Statement -
You have prepared four problems. The difficulty levels of the problems are A1,A2,A3,A4 respectively. A problem set comprises at least two problems and no two problems in a problem set should have the same difficulty level. A problem can belong to at most one problem set. Output the maximum number of problem sets you can create using the four problems.
Input Format
The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
The first and only line of each test case contains four space-separated integers A1, A2, A3, A4, difficulty levels of the four problems.
Output Format
For each test case, output in a single line the maximum number of problem sets you can create using the four problems.
Constraints
1≤T≤1000
1≤A1,A2,A3,A4≤10
Sample Input 1
3
1 4 3 2
4 5 5 5
2 2 2 2
Sample Output 1
2
1
0