Enemy forces are about to attack the town of Dholakpur. The army was recently involved in a battle and most of them are wounded and need time to recover their strength. The king has assigned you the task to recruit an army of M people from the village.
There are N people in the village and each one of them has three different
characteristics:
• Speed
• Strength
• Tactic
Your task is to select M people such that the sum of (the absolute value of the total Speed) + (the absolute value of the total Strength) + (the absolute value of the total Tactic) is the maximum.