Company: Barclays
Difficulty: medium
Minimum Projects to Zero Out Error Scores body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; } .problem-container { max-width: 900px; margin: auto; padding: 20px; border: 1px solid #ddd; border-radius: 8px; background: #f9f9f9; } h1, h3 { color: #333; } pre { background: #f4f4f4; padding: 10px; border: 1px solid #ddd; border-radius: 5px; overflow-x: auto; } ul { margin: 0; padding-left: 20px; } .example { margin-top: 20px; } .example .input, .example .output { margin-bottom: 10px; } Minimum Projects to Zero Out Error Scores Ethan is the leader of a team with N members. Each team member has an initial error score based on their past work. Ethan wants to reduce the error score of all team members to zero by assigning them projects to complete. The rules for decreasing the error scores are as follows: Whenever a team member completes a project successfully, their error score decreases by a count P . The error scores of all other team members with error scores greater t