You are a coach of World Duo Coding championship. You want to choose the strongest team of two players from N players
Each player has some scores based on two parameters, Coordination and Problem Solving skills. The overall skill of a team
is evaluated as the sum of Problem Solving Skills of both players and the absolute difference between Coordination of both
players.
For example
c[1] and ps 1] are Coordination and Problem Solving skills of player 1
c[2] and ps[2] are Coordination and Problem Solving Skills of Player 2
Then overall skill of the team of these two players is ps[1] + ps[2] + abs(c[1] – c[2])
The host of the contest has decided
parameter K such that no team must have the absolute difference between the
Coordination of both players more than K, that is, abs(c[1] - c[2]) SK
It is guaranteed that there exists at least one pair of players that satisfy the constraint abs(c[1] - c[2])
Answers
Answered by
0
Explanation:
oh my God don't put like this difficult questions
Similar questions