← All problemsSign in

Hunger Games Finale

You have reached the final level of Hunger Games and as usual, a tough task awaits you. You have a circular dining table and $N$ hungry animals. You need to place them on the table. Each animal has a hunger value. You can place the animals in any order on the circular table. Once you place them you need to calculate the Danger value of your arrangement. The danger value of the arrangement is the

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