Another Magical Array
CodeChefOpen on judge ↗
An array containing $N$ elements is given The Array is said to be Magical if all the elements in the array are equal. You have two possible operations: You can either decrease the value of that element, decreasing its value by one (at cost of 1), or remove the element down (at cost of $Hi$). ### Input - First line will contain $T$, number of testcases. Then the testcases follow. - The first lin
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