84. Kids With the Most Chocolates

Acceptance — 0 accepted 0 submissions

Easy
Arrays
No companies listed
Each kid at a birthday party has some chocolates. You have extra chocolates to give, all to one kid.

For each kid, find out whether, after receiving all the extra chocolates, they would have the most chocolates (ties count as most).

Input Format
The first line has n.
The second line has n integers (chocolates each kid has).
The third line has extra.

Output Format
Print n words separated by spaces: Yes or No for each kid.

Constraints
• 1 ≤ n ≤ 100
• 1 ≤ chocolates ≤ 100
• 1 ≤ extra ≤ 50

Example 1

Input
5
2 3 5 1 3
3
Output
Yes Yes Yes No Yes

Explanation Max is 5. Kids with 2, 3, 5, 3 can reach 5 or more. The kid with 1 reaches only 4.

Example 2

Input
3
4 2 1
1
Output
Yes No No

Explanation Only the kid with 4 can be the top.

Example 3

Input
2
10 10
1
Output
Yes Yes

Explanation Both already share the top.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
Yes Yes Yes No Yes
No results yet
Run your code to test it against the sample cases.
Problem List