← All problemsSign in

Mei Mei and dress

Mei Mei, being the diva she is, loves to dance. She wants to woo Po and thus decides to buy a dress as colourful as possible. But in order to get the most colourful dress, she has to solve a problem. She has an array of $N$ elements $A_1, A_2, \ldots, A_N$. Each element of the array is between $1$ and $N$(both inclusive). The value at any index is called the intensity of that index. The power o

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