Here is the link to the problem.
Question: - PLAYFIT Problem - CodeChef
My Solution:-
https://www.codechef.com/viewsolution/32807637
What I did in this solution is that I am taking the maximum difference from the matches.
But in case of odd number of matches, the difference of the last two matches is taken separately, and then compared with the remaining matches.
I have run various test cases, the results are matching.
Thank you in advanced