Sports Day
CodeChefOpen on judge ↗
Sometime in the future, the current batch of first yearites get a chance to visit college, to watch a race being organized on the sports day. There are $N$ participants who take part in the race. The speed of each member $i$ is $s_i$. The operation $lambda$ $d_i$ of $i^{th}$ index is defined as the difference between the maximum and minimum running speed among the first i members who ran the ra
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