Gift from Tyrion
CodeChefOpen on judge ↗
Tyrion Lannister has planned a suitable reward for Podrick Payne his squire for saving his life in the battle of Blackwater Bay. He intends for Pod to have a good time in one of Petyr Baelish's several establishments in Kings Landing. The establishment has several pleasures each with a pleasure value Pi. Each pleasure also has a fee of Ci. At the end of the day Tyrion wants Pod to have experience
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