Guan is a nutritionist looking for clients. He has a total of N potential clients, each with a calorie count Ci and a price Pi that the client would pay Guan if Guan chose to take this client up.
However, Guan faces a very big problem. His company insists that he "specialises" in a field, so the difference between the maximum calorie intake of all his clients and the minimum calorie intake of all his clients must not exceed L. Also, Guan can only take up a maximum of K clients. Help Guan earn the maximum amount of money possible.
7 3 6 3 7 5 9 7 3 11 2 13 6 14 8 15 3