Given a sequence of triplets formed by two names and and a natural , that indicate that has paid euros to , print the final balance of each person, first sorted by name, and then sorted by balance.
Input is a non empty sequence of triplets formed each one by two names and a natural. There are not two people with the same name.
Your program must print the final balance of each person, first sorted by name, and then sorted by balance, separated by a line with twenty dashes. In the event of a tie in the balance, it must print first the smallest name.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T10:17:40.398Z
© Jutge.org, 2006–2026.
https://jutge.org