← All problemsSign in

Balanced Plates

Ganesha loves eating modaks. He has been served $N$ plates of modaks with each plate having $arr[i]$ modaks in it. Ganesha likes balanced plates. So, he wants to make **number of modaks in all plates equal**. There are 2 operations possible. Pick any element of $arr$ and either decrease it or increase it 1. by 1 modak - Cost of each operation is Rs. $X$ 2. by 2 modaks - Cost of each operation is

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