There are n kids with candies. You are given an integer array candies, where each candies[i] represents the number of candies the i-th kid has, and an integer extraCandies. Return a boolean array where result[i] is true if, after giving the i-th kid all extraCandies, they could have the greatest number of candies among all kids.
Input: An integer array candies and an integer extraCandies.
Output: Boolean array — result[i] is true if kid i can have the maximum after receiving extraCandies.
Input: [2,3,5,1,3],3
Output: [true,true,true,false,true]
Explanation: max=5. Kid0:2+3=5>=5→true. Kid1:3+3=6>=5→true. Kid2:5+3=8>=5→true. Kid3:1+3=4<5→false. Kid4:3+3=6>=5→true.Input: [4,2,1,1,2],1
Output: [true,false,false,false,false]
Explanation: max=4. Only kid0:4+1=5>=4. Rest<4. [true,false,false,false,false].Input: [12,1,12],10
Output: [true,false,true]
Explanation: max=12. Kid0:12+10=22>=12→true. Kid1:1+10=11<12→false. Kid2:12+10=22>=12→true.n == candies.length2 <= n <= 1001 <= candies[i] <= 1000 <= extraCandies <= 50