#K45837. Taco High Score Challenge
Taco High Score Challenge
Taco High Score Challenge
Given an array of players' scores and an extra points value, determine whether each player could achieve the highest score by adding the extra points to their current score.
Mathematically, for each player with score s_i, check whether:
$$s_i + \text{extraPoints} \geq \max_{j}(s_j)$$For example, if the scores are [2, 3, 5, 1, 3] and extraPoints = 3, the result is [True, True, True, False, True] because adding 3 yields [5, 6, 8, 4, 6] and the highest score is 8.
inputFormat
The input is read from standard input (stdin) and has the following format:
- First line: Two space-separated integers: n (the number of players) and extraPoints.
- Second line: n space-separated integers representing the scores of each player.
outputFormat
Print to standard output (stdout) a single line with n Boolean values (either True or False) separated by spaces. Each Boolean indicates whether the corresponding player's score can become the highest if extraPoints are added.
## sample5 3
2 3 5 1 3
True True True False True