← All problemsSign in

Spoiled for Choice

*Felicity is a huge fest, and you'll see many food stalls that have been set up for you to try out some interesting dishes!* You are in a group of $N$ starving students, hence you all went to check out the $N + 1$ food stalls lined up for Felicity. These stalls are lined up from left to right, with stall number $1$ as the leftmost, and stall number $N + 1$ as the rightmost. Stall $i$ has $a_i$ va

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