← All problemsSign in

Potion Master

Dr Mandrake is a potion master who specialises in recovery-potions.The people of Argo town are suffering from canora virus.Dr mandrake is asked to prepare a potion to cure them. He has $N$ Potions of different sizes arranged in his shelf ,to cure the disease he needs $Q$ pairs of potions where each pair will satisfy the following condition $P_i+P_j$ = $X$. where ‘$X$’ is the secret number. $P_i

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