Let’s buy Laddus
CodeChefOpen on judge ↗
Bheem and Chutki are best friends. They always go to buy laddus together at Indu’s shop. Indu, the shopkeeper has $N$ different types of laddus, and each type of laddu has a quality which is given by $a_i$, $1 \leq i \leq N$, Also, note that Indu has an infinite supply of laddu for each type. They decided to go to Indu's shop for $M$ days and buy **exactly 2 different quality laddus** from Indu
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