Crimes are frequent in a planet far away from earth. So the people there have decided to form a
police force and they want the oldest five persons to be the police officers. Because there are many people in this village, they want you to write a program to find the oldest five.
Input (police.in)
1. First line contains N (5 <= N <= 1000).
2. Each of the next N lines contains Ai which is the age of the ith person. The ID number of
the ith person is also ‘i’.
Output (police.out)
Example Input
10
10
3
20
100
50
11
15
25
60
75
Example Output
4
10
9
5
8
238 Views |
No comments yet.