Winners
Time limit1sMemory limit512 MB
Find the highest score among N competitors and print the letters of all competitors who achieved it.
- Level
Easy1 of 10
- Topics
- Array
- Solved
- No attempts yet
Problem
A marksman tournament is underway. The competitors who scored the highest number of points advance to the next round. To help the jury, write a program that determines which competitors advance to the next round. Competitors are assigned consecutive uppercase letters of the Latin alphabet, starting from A.
Write a program that:
- reads each competitor's score from standard input,
- determines which competitors advance to the next round,
- prints their identifiers to standard output.
Input
The first line contains the number of competitors . The second line contains non-negative integers separated by single spaces; the -th number is the score of the -th competitor in the order the identifiers were assigned. A competitor's score does not exceed .
Output
On the first line, print the identifiers (assigned letters) of the competitors who achieved the highest number of points. The letters must be printed in alphabetical order with no spaces between consecutive letters.