← All problemsSign in

Ram and Phone Trading Shop

Ram ,being unemployed, has decided to open up a Phone Trading Shop! Each phone has two parameters : price $(P)$ and speed $(S)$. Initially Ram has $N$ phones and you are given the list of the price and speed of each of the phones. $M$ customers will visit Ram's shop today and each of them will do the following: - Sell their current phone. - Look for the cheapest phone having atleast $2$ times m

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