← All problemsSign in

Waves is back!

The Waves preparation is going on in the campus and this time $K$ number of guests are coming on the campus. You are in-charge of visitors' guest house(VGH) for the day. There are $N$ rooms in the VGH in a straight line starting from room number $1$ to room number $N$. Also, each room has a fragrance index assigned to it, that is, room number $i$ has a fragrance index $f_i$. You have to accommod

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