Sample Input 5 3(K) 5 4 3 2 1
Sample Output 4
Explanation {5, 4, 2} & {5, 3, 1} & {4, 3, 3} & {4, 2, 1}
How to solve this?