Same Mark Distance
CodeChefOpen on judge ↗
Chef has a list of scores of $N$ students $[S_1, S_2, ... S_N]$ of IIIT Bhubaneswar where $i$ in $S_i$ represents the ID of the corresponding student. Chef wants you to perform two types of operations: - $1$ $D$ $M$ Update the score of student with ID $D$ to $M$. - $2$ $L$ $R$ Find the maximum value of $SameMarkDistance$ in the range $[S_L, ...S_R]$ (both inclusive) and print the score h
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