Santa and Gifts
CodeChefOpen on judge ↗
Santa Claus monitors every child throughout the year and prepares a goodness level for each child. There are $N$ children in the city of Rovaniemi and the goodness level of each of them is given by an array $A$. Santa Claus decided to give the $i$ th child $B[i]$ coins. He is very impartial so he should give the most number of coins to the child with the highest goodness level. More formally,
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start