← All problemsSign in

If Only I Could Read

CodeChefRating 1350Open on judge ↗

The *median* of an array $B$ of length $2M$ is defined as follows: - Sort $B$ in non-decreasing order. - The median of $B$ is then defined to be the element $B_M$, after sorting. That is, the median of $B$ is obtained by sorting it in non-decreasing order and then taking the left of the two middle elements. For example, if $B = [2, 5, 1, 2, 4, 3]$, the sorted array is $[1, 2, 2, 3, 4, 5]$ and t

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start