Problem 1626 · Medium

Best Team With No Conflicts

Pick a group of players whose total score is as large as possible while never letting a younger player outscore an older one in the team. The visual sorts players by age and marks which ones can join a chain.

Open the interactive visualisation