Diwali Gifts
CodeChefOpen on judge ↗
The festival of Diwali has arrived! Aniket's friends have decided to give him a gift every minute. Aniket being good at Math wants to deal with the prices of these gifts. After receiving every gift, he wants to know the difference between the prices of the most expensive and the least expensive gift he has received yet. Can you help him do this task. Input First line will contain an integer n sh
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