Input: Arr[] = {2, 1, 7, 5, 5, 4, 1, 1, 3, 3, 2, 2}
Output: 10
Explanation:
We can form 3 quadruplet sets as [7, 5, 5, 1], [4, 3, 3, 1], [2, 2, 2, 1].
The summation of all Y's are 5 + 3 + 2 = 10 which is the maximum possible value.
Input: arr[] = {1, 51, 91, 1, 1, 16, 1, 51, 48, 16, 1, 49}
Output: 68