← All problemsSign in

Game of Median

Piyush has an array $A$ of length $N$ consisting of positive integers where, $N$ is an odd number. He loves number $M$ and wants to make the median of the array equal to it. Also, he has number $K$ with him and can only do the following operation any number of time with it: - Choose any integer between 1 and $N$ and multiply the $i-$th element, $A_i$ with $K$. Piyush wants your help to determine

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