Kings
Time limit2sMemory limit1024 MB
Given three armies' battalion counts and sizes, the task is to print the name or names of the army with the most warriors.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Statement
Joffrey's army consists of battalions of warriors each. Robb's army consists of battalions of warriors each. Stannis's army consists of battalions of warriors each.
Help the Citadel analysts find out which army is the strongest. The strength of an army is the total number of warriors in it.
Input
The first and only line of the input contains six integers (). These are the number of battalions for Joffrey, Robb, and Stannis, followed by the number of warriors in each battalion of the respective army.
Output
If the king with the strongest army has warriors, print the names of all kings whose armies have warriors on a single line, separated by spaces, in lexicographic order.