Company: Barclays
Difficulty: medium
Minimize Team Error Scores Ethan is the leader of a team with N members. He has assigned an error score to each member in his team based on the bugs that he has found in that particular team member’s task. Because the error score has increased to a significantly large value, he wants to give all the team members a chance to improve their error scores, thereby improving their reputation in the organization. Ethan introduces a new rule: whenever a team member completes a project successfully, the error score of that member decreases by a count P and the error score of all the other team members whose score is greater than zero decreases by a count Q . Write an algorithm to help Ethan find the minimum number of projects that the team must complete in order to make the error score of all the team members zero. Input Format The first line of the input consists of an integer errorScore_size , representing the total number of team members ( N ). The second line consists of N space-separated i